2012-09-15 21:50:15 +00:00
|
|
|
require 'helper'
|
|
|
|
|
|
|
|
describe "show-input" do
|
|
|
|
before do
|
|
|
|
@t = pry_tester
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'should correctly show the current lines in the input buffer' do
|
2012-12-07 22:08:49 +00:00
|
|
|
eval_str = unindent(<<-STR)
|
2012-09-15 21:50:15 +00:00
|
|
|
def hello
|
|
|
|
puts :bing
|
|
|
|
STR
|
|
|
|
|
|
|
|
@t.process_command 'show-input', eval_str
|
|
|
|
@t.last_output.should =~ /\A\d+: def hello\n\d+: puts :bing/
|
|
|
|
end
|
|
|
|
end
|