summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-21 20:34:37 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-21 20:34:37 +0000
commitc60c0503782d68a1ba8a7b675f6e53713c5b67da (patch)
treefe09bc820892d93d54204927e7002d9c7b9fc480
parent9150340b9bcbe305c2647a8d6f6f8e754769f3e7 (diff)
* test/ruby/envutil.rb (assert_warning): show diff.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--test/ruby/envutil.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/ruby/envutil.rb b/test/ruby/envutil.rb
index 98b89ed..85116fd 100644
--- a/test/ruby/envutil.rb
+++ b/test/ruby/envutil.rb
@@ -299,10 +299,9 @@ eom
raise res
end
- def assert_warning(pat, message = nil)
+ def assert_warning(pat, msg = nil)
stderr = EnvUtil.verbose_warning { yield }
- message = ' "' + message + '"' if message
- msg = proc {"warning message #{stderr.inspect} is expected to match #{pat.inspect}#{message}"}
+ msg = message(msg) {diff stderr, pat}
assert(pat === stderr, msg)
end