Permalink
Browse files

* 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
  • Loading branch information...
1 parent 9150340 commit c60c0503782d68a1ba8a7b675f6e53713c5b67da @nobu nobu committed Mar 21, 2013
Showing with 2 additions and 3 deletions.
  1. +2 −3 test/ruby/envutil.rb
View
@@ -299,10 +299,9 @@ def assert_separately(args, file = nil, line = nil, src, **opt)
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

0 comments on commit c60c050

Please sign in to comment.