Project

General

Profile

Actions

Bug #898

closed

Test::Unit::Assertions#assert_nothing_raised does not increment number of assertions

Added by ngoto (Naohisa Goto) over 15 years ago. Updated almost 13 years ago.

Status:
Closed
ruby -v:
Backport:
[ruby-dev:37480]

Description

=begin
assert_nothing_raised が assertionsの数を増やしません。

% ruby-trunk20840 -v -r test/unit -e 'class A < Test::Unit::TestCase; def test_b; assert_nothing_raised { true }; end; end'
ruby 1.9.1 (2008-12-17 revision 20840) [i686-linux]
nil
Loaded suite -e
Started
.
Finished in 0.000833 seconds.

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

"0 assertions"になっています。
(余計なnilが表示されるのはBug #876にて既に報告されています。)
Ruby 1.9.1 preview 2 でも同様に"0 assertions"でした。

Ruby 1.8.7 では正常にカウントされ"1 assertions"になります。

% ruby187p72 -v -r test/unit -e 'class A < Test::Unit::TestCase; def test_b; assert_nothing_raised { true }; end; end'
ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-linux]
Loaded suite -e
Started
.
Finished in 0.001313 seconds.

1 tests, 1 assertions, 0 failures, 0 errors
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0