what is the minitest equivalent of assert_nothing_raised?

T

timr

Though it was in the test/unit module for 1.8, 1.9's minitest module
seems to lack an assert_nothing_raised method. That is kind of
frustrating. I'll give 10 thank-yous to the first person who knows how
to write a minitest compatible test for what in Test::Unit looked
like:

def test_no_error_is_raised
assert_nothing_raised do
method_whatever(*args)
end
end

Thanks (that one is free),
Tim
 
J

John Barnette

Hi,

Though it was in the test/unit module for 1.8, 1.9's minitest module
seems to lack an assert_nothing_raised method.

It was removed because it's not useful enough. Test the proper behavior =
of your method, not the fact that it doesn't raise an exception.=
 
T

timr

10.times{puts "Thanks John"}
Tim

Hi,



It was removed because it's not useful enough. Test the proper behavior of your method, not the fact that it doesn't raise an exception.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top