mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
Move empty line test
This commit is contained in:
parent
7a0aaaeecf
commit
db11320117
2 changed files with 6 additions and 11 deletions
|
@ -519,17 +519,6 @@ describe "Pry::DefaultCommands::Input" do
|
|||
out.should =~ /b\n\d+:.*c\n\d+:.*d/
|
||||
end
|
||||
|
||||
it "should not contain empty lines" do
|
||||
redirect_pry_io(InputTester.new(":place_holder", "2 + 2", "", "", "3 + 3", "hist", "exit-all"), @str_output) do
|
||||
pry
|
||||
end
|
||||
|
||||
a = @str_output.string.each_line.to_a.index{|line| line.include?("2 + 2") }
|
||||
b = @str_output.string.each_line.to_a.index{|line| line.include?("3 + 3") }
|
||||
|
||||
(a + 1).should == b
|
||||
end
|
||||
|
||||
it "should store a call with `--replay` flag" do
|
||||
redirect_pry_io(InputTester.new(":banzai", "hist --replay 1",
|
||||
"hist", "exit-all"), @str_output) do
|
||||
|
|
|
@ -30,6 +30,12 @@ describe Pry do
|
|||
Pry.history << '_ += 1'
|
||||
Pry.history.to_a.grep('_ += 1').count.should == 1
|
||||
end
|
||||
|
||||
it "should not record empty lines" do
|
||||
c = Pry.history.to_a.count
|
||||
Pry.history << ''
|
||||
Pry.history.to_a.count.should == c
|
||||
end
|
||||
end
|
||||
|
||||
describe ".load_history" do
|
||||
|
|
Loading…
Add table
Reference in a new issue