mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
add testcase for #1464
This commit is contained in:
parent
c27fe9c04d
commit
fd2e366c2e
1 changed files with 10 additions and 0 deletions
|
@ -112,4 +112,14 @@ describe Pry do
|
|||
expect(mock_pry("# basic addition")).to eq("")
|
||||
end
|
||||
end
|
||||
|
||||
describe "custom non-IO object as $stdout" do
|
||||
it "does not crash pry" do
|
||||
old_stdout = $stdout
|
||||
custom_io = Class.new { def write(*) end }.new
|
||||
pry_eval = PryTester.new(binding)
|
||||
expect(pry_eval.eval("$stdout = custom_io", ":ok")).to eq(:ok)
|
||||
$stdout = old_stdout
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue