diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-09-27 06:35:10 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-09-27 06:35:10 +0000 |
commit | 868a0970b6503c402d1190ecc00c7cd4c9521ece (patch) | |
tree | c3b362d13161e23cca96cf0f4fd83b30613285f4 /test/ruby/test_yield.rb | |
parent | d01b06ff7c706a689c98548bc4d0e8a3eeb65539 (diff) | |
download | ruby-868a0970b6503c402d1190ecc00c7cd4c9521ece.tar.gz |
test/unit/assertions.rb: all_assertions
* test/lib/test/unit/assertions.rb (all_assertions): try all
assertions and check if all passed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_yield.rb')
-rw-r--r-- | test/ruby/test_yield.rb | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/test/ruby/test_yield.rb b/test/ruby/test_yield.rb index e7d150a08f..5c98bb8850 100644 --- a/test/ruby/test_yield.rb +++ b/test/ruby/test_yield.rb @@ -356,16 +356,12 @@ class TestRubyYieldGen < Test::Unit::TestCase end def assert_all_sentences(syntax, *args) - fails = [] syntax = Sentence.expand_syntax(syntax) - Sentence.each(syntax, *args) {|t| - begin - yield t - rescue MiniTest::Assertion => e - fails << e.message - end - } - assert(fails.empty?, proc {fails.join("\n--------\n")}) + all_assertions do |a| + Sentence.each(syntax, *args) {|t| + a.for(t) {yield t} + } + end end def test_yield |