summaryrefslogtreecommitdiff
path: root/test/ruby/test_m17n.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-15 06:24:10 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-15 06:24:10 +0000
commitb30c4aa8d7e1781b71ec0a9fa4826d58030101f9 (patch)
tree063d783a01f399270cdec31246db6fe0d22c66bd /test/ruby/test_m17n.rb
parentfbdce669086c99212384d7168777e7017690829e (diff)
* test/ruby/test_m17n.rb (assert_warning): use common method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_m17n.rb')
-rw-r--r--test/ruby/test_m17n.rb13
1 files changed, 1 insertions, 12 deletions
diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb
index 3bfb540b13..d8f45078bf 100644
--- a/test/ruby/test_m17n.rb
+++ b/test/ruby/test_m17n.rb
@@ -1,5 +1,5 @@
require 'test/unit'
-require 'stringio'
+require_relative 'envutil'
class TestM17N < Test::Unit::TestCase
def assert_encoding(encname, actual, message=nil)
@@ -23,17 +23,6 @@ class TestM17N < Test::Unit::TestCase
assert_equal(a(bytes), a(actual), message)
end
- 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 assert_regexp_generic_encoding(r)
assert(!r.fixed_encoding?)
%w[ASCII-8BIT EUC-JP Windows-31J UTF-8].each {|ename|