BUG IN test/unit!?!?

T

timr

assert_raise and assert_nothing_raise both pass running the same code.
Ruby in fact does raises a LocalJumpError. Am I missing something or
is this a real live bug in test/unit?
Thanks,
Tim


require "test/unit"

class TestProcs < Test::Unit::TestCase

def block_return_tester
yield
end

def test_something_rasied
assert_raise LocalJumpError do
block_return_tester{return}
end
end
def test_nothing_raised
assert_nothing_raised do
block_return_tester{return}
end
end
end


Loaded suite untitled
Started
...
Finished in 0.000519 seconds.

2 tests, 1 assertions, 0 failures, 0 errors, 0 skips
 

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,769
Messages
2,569,582
Members
45,062
Latest member
OrderKetozenseACV

Latest Threads

Top