From 826cdd67a043b520c70cc9fcf66028603a130560 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 13 Mar 2012 03:34:11 +0000 Subject: assert_warn, assert_warning * test/ruby/envutil.rb (assert_warn): add optional message argument. * test/ruby/envutil.rb (assert_warning): moved from test_io_m17n.rb git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_io_m17n.rb | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'test/ruby/test_io_m17n.rb') diff --git a/test/ruby/test_io_m17n.rb b/test/ruby/test_io_m17n.rb index b86dfb3274..4f01a82674 100644 --- a/test/ruby/test_io_m17n.rb +++ b/test/ruby/test_io_m17n.rb @@ -1,7 +1,6 @@ require 'test/unit' require 'tmpdir' require 'timeout' -require 'stringio' require_relative 'envutil' class TestIO_M17N < Test::Unit::TestCase @@ -12,17 +11,6 @@ class TestIO_M17N < Test::Unit::TestCase Encoding::UTF_8 ] - def assert_warning(pat, mesg=nil) - begin - org_stderr = $stderr - $stderr = StringIO.new(warn = '') - yield - ensure - $stderr = org_stderr - end - assert_match(pat, warn, mesg) - end - def with_tmpdir Dir.mktmpdir {|dir| Dir.chdir(dir) { -- cgit v1.2.3