ruby-changes:27819
From: nobu <ko1@a...>
Date: Fri, 22 Mar 2013 05:34:46 +0900 (JST)
Subject: [ruby-changes:27819] nobu:r39871 (trunk): * test/ruby/envutil.rb (assert_warning): show diff.
nobu 2013-03-22 05:34:37 +0900 (Fri, 22 Mar 2013) New Revision: 39871 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=39871 Log: * test/ruby/envutil.rb (assert_warning): show diff. Modified files: trunk/test/ruby/envutil.rb Index: test/ruby/envutil.rb =================================================================== --- test/ruby/envutil.rb (revision 39870) +++ test/ruby/envutil.rb (revision 39871) @@ -299,10 +299,9 @@ eom https://github.com/ruby/ruby/blob/trunk/test/ruby/envutil.rb#L299 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/