Tidier test for BasicObject support

This commit is contained in:
Conrad Irwin 2012-12-28 14:12:19 -08:00
parent 9ce0397b7a
commit b9117c8619
2 changed files with 4 additions and 5 deletions

View File

@ -67,6 +67,7 @@ class ReplTester
reset_output
repl_mailbox.push input
wait
Pry.output.string
end
# Assert that the current prompt matches the given string or regex.

View File

@ -10,11 +10,9 @@ describe Pry do
# regression test for exotic object support
it "Should not error when return value is a BasicObject instance" do
lambda do
redirect_pry_io(InputTester.new("BasicObject.new", "exit-all"), StringIO.new) do
Pry.start
end
end.should.not.raise NoMethodError
ReplTester.start do
input('BasicObject.new').should =~ /^=> #<BasicObject:/
end
end
end