1
0
Fork 0
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:
strcmp 2015-08-24 03:01:56 +01:00
parent c27fe9c04d
commit fd2e366c2e

View file

@ -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