Bug #898
Test::Unit::Assertions#assert_nothing_raised does not increment number of assertions
| Status: | Closed | Start date: | 12/17/2008 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | 12/24/2008 | |
| Assignee: | % Done: | 100% |
||
| Category: | lib | |||
| Target version: | 1.9.1 Release Candidate | |||
| ruby -v: |
Description
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
Associated revisions
* lib/test/unit/assertions.rb (assert_nothing_raised): increment
assertion count. [ruby-dev:37480]
History
Updated by Yuki Sonoda about 3 years ago
- Category set to lib
- Target version set to 1.9.1 Release Candidate
Updated by Yuki Sonoda about 3 years ago
- Due date set to 12/24/2008
Updated by Yuki Sonoda about 3 years ago
- Assignee set to Akira Tanaka
Updated by Akira Tanaka about 3 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
Applied in changeset r20915.