Created
June 25, 2012 10:16
-
-
Save kyrylo/2987788 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it 'should keep correct old stack' do | |
#1 | |
redirect_pry_io(InputTester.new("cd @", "cd -", @cs, "exit-all")) do | |
Pry.start(@o) | |
end | |
Pad.cs.old_stack.should == nil | |
#2 | |
redirect_pry_io(InputTester.new("cd :mon_dogg", "cd @", @cs, "exit-all")) do | |
Pry.start(@o) | |
end | |
Pad.cs.old_stack.eval("self").should == @o | |
#3 | |
redirect_pry_io(InputTester.new("cd :mon_dogg", "cd @", "cd -", @cs, "exit-all")) do | |
Pry.start(@o) | |
end | |
Pad.cs.old_stack.eval("self").should == :mon_dogg | |
end | |
end | |
# -------------------VERSUS------------------- | |
it 'should keep correct old stack' do | |
redirect_pry_io(InputTester.new("cd @", "cd -", @cs, "exit-all")) do | |
Pry.start(@o) | |
end | |
Pad.cs.old_stack.should == nil | |
redirect_pry_io(InputTester.new("cd :mon_dogg", "cd @", @cs, "exit-all")) do | |
Pry.start(@o) | |
end | |
Pad.cs.old_stack.eval("self").should == @o | |
redirect_pry_io(InputTester.new("cd :mon_dogg", "cd @", "cd -", @cs, "exit-all")) do | |
Pry.start(@o) | |
end | |
Pad.cs.old_stack.eval("self").should == :mon_dogg | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment