2012-09-15 21:50:15 +00:00
|
|
|
require 'helper'
|
|
|
|
|
|
|
|
describe "!" do
|
|
|
|
before do
|
|
|
|
@t = pry_tester
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'should correctly clear the input buffer ' do
|
2012-12-18 08:52:55 +00:00
|
|
|
@t.accept_line unindent(<<-STR)
|
2012-09-15 21:50:15 +00:00
|
|
|
def hello
|
|
|
|
puts :bing
|
|
|
|
STR
|
|
|
|
|
2012-12-18 08:52:55 +00:00
|
|
|
@t.process_command '!'
|
2012-09-15 21:50:15 +00:00
|
|
|
@t.last_output.should =~ /Input buffer cleared!/
|
2012-12-18 08:52:55 +00:00
|
|
|
@t.eval_string.should == ''
|
2012-09-15 21:50:15 +00:00
|
|
|
end
|
|
|
|
end
|