From f73a92e46ba315a641da48ea0ccf09f0d228509d Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 3 Mar 2015 08:19:39 +0000 Subject: envutil.rb: improve by assert_pattern_list * test/lib/envutil.rb (assert_in_out_err): improve to match by assert_pattern_list if expected result is other than Regexp or String list. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/lib/envutil.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/lib/envutil.rb b/test/lib/envutil.rb index 71d00b9380..8d4dc707c7 100644 --- a/test/lib/envutil.rb +++ b/test/lib/envutil.rb @@ -344,8 +344,10 @@ module Test begin if exp.is_a?(Regexp) assert_match(exp, act, message) - else + elsif exp.all? {|e| String === e} assert_equal(exp, act.lines.map {|l| l.chomp }, message) + else + assert_pattern_list(exp, act, message) end rescue MiniTest::Assertion => e errs << e.message -- cgit v1.2.3