1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/ruby/envutil.rb (Test::Unit::Assersions#assert_warn):

new assersion to assert that a particular warning message is 
  displayed.
  forwardport from branches/ruby_1_9_2@29795.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
yugui 2010-11-17 07:08:07 +00:00
parent 8e2a1cba36
commit 8903faf1a1
2 changed files with 12 additions and 0 deletions

View file

@ -1,3 +1,10 @@
Wed Nov 17 16:04:23 2010 Yuki Sonoda (Yugui) <yugui@yugui.jp>
* test/ruby/envutil.rb (Test::Unit::Assersions#assert_warn):
new assersion to assert that a particular warning message is
displayed.
forwardport from branches/ruby_1_9_2@29795.
Wed Nov 17 15:16:48 2010 NARUSE, Yui <naruse@ruby-lang.org>
* regint.h (OnigOpInfoType): constify name.

View file

@ -173,6 +173,11 @@ module Test
assert(status.success?, m)
end
def assert_warn(msg)
stderr = EnvUtil.verbose_warning { yield }
assert(msg === stderr, "warning message #{stderr.inspect} is expected to match #{msg.inspect}")
end
end
end
end