1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00
This commit is contained in:
Conrad Irwin 2014-04-15 12:20:52 -07:00 committed by Ryan Fitzgerald
parent 4e11c93185
commit 513fc182ca
2 changed files with 7 additions and 1 deletions

View file

@ -1,6 +1,6 @@
class Pry
class Command::Bang < Pry::ClassCommand
match '!'
match /^\s*!\s*$/
group 'Editing'
description 'Clear the input buffer.'
command_options :use_prefix => false

View file

@ -15,4 +15,10 @@ describe "!" do
@t.last_output.should =~ /Input buffer cleared!/
@t.eval_string.should == ''
end
it 'should not clear the input buffer for negation' do
@t.push '! false'
@t.last_output.should =~ /true/
@t.eval_string.should == ''
end
end