diff options
Diffstat (limited to 'test/ruby/test_syntax.rb')
-rw-r--r-- | test/ruby/test_syntax.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb index b7f001e2f0..70b3934d4f 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -501,10 +501,13 @@ e" end def assert_dedented_heredoc(expect, result, mesg = "") - %w[eos "eos" 'eos' `eos`].each do |eos| - assert_equal(eval("<<-#{eos}\n#{expect}eos\n"), - eval("<<~#{eos}\n#{result}eos\n"), - message(mesg) {"with #{eos}"}) + all_assertions(mesg) do |a| + %w[eos "eos" 'eos' `eos`].each do |eos| + a.for(eos) do + assert_equal(eval("<<-#{eos}\n#{expect}eos\n"), + eval("<<~#{eos}\n#{result}eos\n")) + end + end end end |