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

Use capture_output instead of capture_io

This commit is contained in:
Hiroshi SHIBATA 2021-09-13 21:14:42 +09:00
parent be04006c7d
commit ec6f04c092
No known key found for this signature in database
GPG key ID: F9CF13417264FAC2
4 changed files with 6 additions and 6 deletions

View file

@ -79,7 +79,7 @@ class TestEnumerator < Test::Unit::TestCase
assert_raise(NoMethodError) { enum.each {} }
enum.freeze
assert_raise(ArgumentError) {
capture_io do
capture_output do
# warning: Enumerator.new without a block is deprecated; use Object#to_enum
enum.__send__(:initialize, @obj, :foo)
end

View file

@ -764,7 +764,7 @@ EXPECTED
$VERBOSE = true
_, err = capture_io do
_, err = capture_output do
assert_equal "\000", [0].pack("*U")
end
@ -783,7 +783,7 @@ EXPECTED
$VERBOSE = true
_, err = capture_io do
_, err = capture_output do
assert_equal [0], "\000".unpack("*U")
end

View file

@ -214,7 +214,7 @@ module Test
# See also: #assert_silent
def assert_output stdout = nil, stderr = nil
out, err = capture_io do
out, err = capture_output do
yield
end

View file

@ -1070,11 +1070,11 @@ class TestMiniTestUnitTestCase < Test::Unit::TestCase
end
end
def test_capture_io
def test_capture_output
@assertion_count = 0
non_verbose do
out, err = capture_io do
out, err = capture_output do
puts 'hi'
$stderr.puts 'bye!'
end