Skip to content

Commit

Permalink
Use capture_output instead of capture_io
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Jun 29, 2021
1 parent 14c946e commit 533fe8b
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions test/irb/test_context.rb
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def test_echo_on_assignment
# The default
irb.context.echo = true
irb.context.echo_on_assignment = false
out, err = capture_io do
out, err = capture_output do
irb.eval_input
end
assert_empty err
Expand All @@ -230,7 +230,7 @@ def test_echo_on_assignment
input.reset
irb.context.echo = true
irb.context.echo_on_assignment = true
out, err = capture_io do
out, err = capture_output do
irb.eval_input
end
assert_empty err
Expand All @@ -240,7 +240,7 @@ def test_echo_on_assignment
input.reset
irb.context.echo = false
irb.context.echo_on_assignment = false
out, err = capture_io do
out, err = capture_output do
irb.eval_input
end
assert_empty err
Expand All @@ -250,7 +250,7 @@ def test_echo_on_assignment
input.reset
irb.context.echo = false
irb.context.echo_on_assignment = true
out, err = capture_io do
out, err = capture_output do
irb.eval_input
end
assert_empty err
Expand All @@ -268,7 +268,7 @@ def test_omit_on_assignment

irb.context.echo = true
irb.context.echo_on_assignment = false
out, err = capture_io do
out, err = capture_output do
irb.eval_input
end
assert_empty err
Expand All @@ -277,7 +277,7 @@ def test_omit_on_assignment
input.reset
irb.context.echo = true
irb.context.echo_on_assignment = :truncate
out, err = capture_io do
out, err = capture_output do
irb.eval_input
end
assert_empty err
Expand All @@ -286,7 +286,7 @@ def test_omit_on_assignment
input.reset
irb.context.echo = true
irb.context.echo_on_assignment = true
out, err = capture_io do
out, err = capture_output do
irb.eval_input
end
assert_empty err
Expand All @@ -295,7 +295,7 @@ def test_omit_on_assignment
input.reset
irb.context.echo = false
irb.context.echo_on_assignment = false
out, err = capture_io do
out, err = capture_output do
irb.eval_input
end
assert_empty err
Expand All @@ -304,7 +304,7 @@ def test_omit_on_assignment
input.reset
irb.context.echo = false
irb.context.echo_on_assignment = :truncate
out, err = capture_io do
out, err = capture_output do
irb.eval_input
end
assert_empty err
Expand All @@ -313,7 +313,7 @@ def test_omit_on_assignment
input.reset
irb.context.echo = false
irb.context.echo_on_assignment = true
out, err = capture_io do
out, err = capture_output do
irb.eval_input
end
assert_empty err
Expand All @@ -332,7 +332,7 @@ def test_omit_multiline_on_assignment

irb.context.echo = true
irb.context.echo_on_assignment = false
out, err = capture_io do
out, err = capture_output do
irb.eval_input
end
assert_empty err
Expand All @@ -342,7 +342,7 @@ def test_omit_multiline_on_assignment
input.reset
irb.context.echo = true
irb.context.echo_on_assignment = :truncate
out, err = capture_io do
out, err = capture_output do
irb.eval_input
end
assert_empty err
Expand All @@ -352,7 +352,7 @@ def test_omit_multiline_on_assignment
input.reset
irb.context.echo = true
irb.context.echo_on_assignment = true
out, err = capture_io do
out, err = capture_output do
irb.eval_input
end
assert_empty err
Expand All @@ -362,7 +362,7 @@ def test_omit_multiline_on_assignment
input.reset
irb.context.echo = false
irb.context.echo_on_assignment = false
out, err = capture_io do
out, err = capture_output do
irb.eval_input
end
assert_empty err
Expand All @@ -372,7 +372,7 @@ def test_omit_multiline_on_assignment
input.reset
irb.context.echo = false
irb.context.echo_on_assignment = :truncate
out, err = capture_io do
out, err = capture_output do
irb.eval_input
end
assert_empty err
Expand All @@ -382,7 +382,7 @@ def test_omit_multiline_on_assignment
input.reset
irb.context.echo = false
irb.context.echo_on_assignment = true
out, err = capture_io do
out, err = capture_output do
irb.eval_input
end
assert_empty err
Expand Down Expand Up @@ -429,7 +429,7 @@ def main.inspect

# The default
irb.context.newline_before_multiline_output = true
out, err = capture_io do
out, err = capture_output do
irb.eval_input
end
assert_empty err
Expand All @@ -439,7 +439,7 @@ def main.inspect
# No newline before multiline output
input.reset
irb.context.newline_before_multiline_output = false
out, err = capture_io do
out, err = capture_output do
irb.eval_input
end
assert_empty err
Expand Down

0 comments on commit 533fe8b

Please sign in to comment.