Actions
Bug #2413
closedMiniTest::Assertions#assert_raises ignores message
Description
=begin
% cat test_assert_raise.rb
require 'test/unit'
class TestFoo < Test::Unit::TestCase
def test_foo
assert_raise(RuntimeError, "should show this message") do
end
end
end
% ruby1.8 -v
ruby 1.8.6 (2007-09-24 patchlevel 111) [i486-linux]
% ruby1.8 test_assert_raise.rb
Loaded suite test_assert_raise
Started
F
Finished in 0.021458 seconds.
- Failure:
test_foo(TestFoo) [test_assert_raise.rb:5]:
should show this message.
exception expected but none was thrown.
1 tests, 1 assertions, 1 failures, 0 errors
% ruby-trunk -v
ruby 1.9.2dev (2009-11-30 trunk 25963) [i686-linux]
% ruby-trunk test_assert_raise.rb
Loaded suite test_assert_raise
Started
F
Finished in 0.002544 seconds.
- Failure:
test_foo(TestFoo) [test_assert_raise.rb:5]:
RuntimeError expected but nothing was raised.
1 tests, 1 assertions, 1 failures, 0 errors, 0 skips
%
=end
Actions
Like0
Like0Like0