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