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

rewrite test on top of ReplTester.

This commit is contained in:
Robert Gleeson 2014-03-30 05:52:26 +02:00 committed by Ryan Fitzgerald
parent d9ce4b5436
commit 7306fdee3a

View file

@ -135,12 +135,11 @@ describe "show-source" do
Object.remove_const(:FooBar)
end
it "should find methods of evaluated argument" do
def @o.foobar
FooBar.new
it "evaluates the argument as ruby and shows the source code for the returned value" do
ReplTester.start target: binding do
input 'show-source -e @o.foobar'
output /class FooBar/
end
pry_eval(binding, 'show-source -e @o.foobar').should =~ /class FooBar/
end
end