diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-03-03 08:19:39 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-03-03 08:19:39 +0000 |
commit | f73a92e46ba315a641da48ea0ccf09f0d228509d (patch) | |
tree | f695016ed12f743f1a25f4fda8dad074d16f9351 /test | |
parent | e9ff9e79e4f32a71be8ad8d630b67de300ac2b36 (diff) | |
download | ruby-f73a92e46ba315a641da48ea0ccf09f0d228509d.tar.gz |
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
Diffstat (limited to 'test')
-rw-r--r-- | test/lib/envutil.rb | 4 |
1 files changed, 3 insertions, 1 deletions
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 |