[Ironruby-core] assert_throws Problem

Mohammad Azam lists at ruby-forum.com
Tue Jul 7 14:27:15 EDT 2009


Hi,

I want to say that whatever exception is thrown just pass the test.

class When_a_negative_number_is_passed_to_the_prime_service < TestCase

def test_should_throw_an_exception

primeService = PrimeService.new
primeService.IsPrime(-2)
assert_throws System::Exception

end

end

The exception thrown from the C# side is ArgumentException
-- 
Posted via http://www.ruby-forum.com/.


More information about the Ironruby-core mailing list