1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

Tolerate Bond not being present

This commit is contained in:
Ryan Fitzgerald 2012-09-05 22:39:29 -07:00
parent c9fed62c91
commit f0a16e2cc3
3 changed files with 26 additions and 20 deletions

View file

@ -696,6 +696,7 @@ describe "Pry::Command" do
end
end
if defined?(Bond)
describe 'complete' do
it 'should return the arguments that are defined' do
@set.create_command "torrid" do
@ -709,6 +710,7 @@ describe "Pry::Command" do
@set.complete('torrid ').should.include('--test')
end
end
end
describe 'group' do
before do

View file

@ -611,6 +611,7 @@ describe Pry::CommandSet do
end
end
if defined?(Bond)
describe '.complete' do
it "should list all command names" do
@set.create_command('susan'){ }
@ -622,4 +623,5 @@ describe Pry::CommandSet do
@set.complete('susan ').should == ['--foo']
end
end
end
end

View file

@ -10,10 +10,12 @@ def completer_test(bind, pry=nil, assert_flag=true)
return proc {|*symbols| symbols.each(&test) }
end
describe 'bond-based completion' do
if defined?(Bond)
describe 'bond-based completion' do
it 'should pull in Bond by default' do
Pry.config.completer.should == Pry::BondCompleter
end
end
end
describe Pry::InputCompleter do