Project

General

Profile

Actions

Bug #2413

closed

MiniTest::Assertions#assert_raises ignores message

Added by znz (Kazuhiro NISHIYAMA) over 14 years ago. Updated almost 13 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 1.9.2dev (2009-11-30 trunk 25963) [i686-linux]
Backport:
[ruby-core:26954]

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.

  1. 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.

  1. 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

Also available in: Atom PDF

Like0
Like0Like0