summaryrefslogtreecommitdiff
path: root/spec/completion_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/completion_spec.rb')
-rw-r--r--spec/completion_spec.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/completion_spec.rb b/spec/completion_spec.rb
index f825ae6f..2d3c260e 100644
--- a/spec/completion_spec.rb
+++ b/spec/completion_spec.rb
@@ -4,7 +4,7 @@ require "pry/input_completer"
def completer_test(bind, pry=nil, assert_flag=true)
test = proc {|symbol|
- expect(Pry::InputCompleter.new(pry || Readline, pry).call(symbol[0..-2], :target => Pry.binding_for(bind)).include?(symbol)).to eq(assert_flag)}
+ expect(Pry::InputCompleter.new(pry || Readline, pry).call(symbol[0..-2], target: Pry.binding_for(bind)).include?(symbol)).to eq(assert_flag)}
return proc {|*symbols| symbols.each(&test) }
end
@@ -30,12 +30,12 @@ describe Pry::InputCompleter do
# another jruby hack :((
if !Pry::Helpers::BaseHelpers.jruby?
it "should not crash if there's a Module that has a symbolic name." do
- expect { Pry::InputCompleter.new(Readline).call "a.to_s.", :target => Pry.binding_for(Object.new) }.not_to raise_error
+ expect { Pry::InputCompleter.new(Readline).call "a.to_s.", target: Pry.binding_for(Object.new) }.not_to raise_error
end
end
it 'should take parenthesis and other characters into account for symbols' do
- expect { Pry::InputCompleter.new(Readline).call ":class)", :target => Pry.binding_for(Object.new) }.not_to raise_error
+ expect { Pry::InputCompleter.new(Readline).call ":class)", target: Pry.binding_for(Object.new) }.not_to raise_error
end
it 'should complete instance variables' do
@@ -115,7 +115,7 @@ describe Pry::InputCompleter do
completer_test(binding).call('o.foo')
# trailing slash
- expect(Pry::InputCompleter.new(Readline).call('Mod2/', :target => Pry.binding_for(Mod)).include?('Mod2/')).to eq(true)
+ expect(Pry::InputCompleter.new(Readline).call('Mod2/', target: Pry.binding_for(Mod)).include?('Mod2/')).to eq(true)
end
it 'should complete for arbitrary scopes' do
@@ -130,7 +130,7 @@ describe Pry::InputCompleter do
Con = :constant
end
- pry = Pry.new(:target => Baz)
+ pry = Pry.new(target: Baz)
pry.push_binding(Bar)
b = Pry.binding_for(Bar)
@@ -188,7 +188,7 @@ describe Pry::InputCompleter do
completer_test(binding).call('o.foo')
# trailing slash
- expect(Pry::InputCompleter.new(Readline).call('Mod2/', :target => Pry.binding_for(Mod)).include?('Mod2/')).to eq(true)
+ expect(Pry::InputCompleter.new(Readline).call('Mod2/', target: Pry.binding_for(Mod)).include?('Mod2/')).to eq(true)
end
it 'should complete for arbitrary scopes' do
@@ -203,7 +203,7 @@ describe Pry::InputCompleter do
Con = :constant
end
- pry = Pry.new(:target => Baz)
+ pry = Pry.new(target: Baz)
pry.push_binding(Bar)
b = Pry.binding_for(Bar)
@@ -213,7 +213,7 @@ describe Pry::InputCompleter do
it 'should not return nil in its output' do
pry = Pry.new
- expect(Pry::InputCompleter.new(Readline, pry).call("pry.", :target => binding)).not_to include nil
+ expect(Pry::InputCompleter.new(Readline, pry).call("pry.", target: binding)).not_to include nil
end
it 'completes expressions with all available methods' do