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 | 71730b42434e3c2dce7e7f6488bd54fae52cae51 (patch) | |
tree | c3b362d13161e23cca96cf0f4fd83b30613285f4 /test/ruby/test_yield.rb | |
parent | 6b52b88d46e5cda0def68665f185a3ac4335076c (diff) |
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 |