diff options
Diffstat (limited to 'spec/prompt_spec.rb')
-rw-r--r-- | spec/prompt_spec.rb | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/spec/prompt_spec.rb b/spec/prompt_spec.rb index ddda435c..0320cb5b 100644 --- a/spec/prompt_spec.rb +++ b/spec/prompt_spec.rb @@ -7,7 +7,7 @@ describe "Prompts" do redirect_pry_io(InputTester.new("exit-all")) do Pry.start(self, :prompt => proc { |v| config = v }) end - config.is_a?(Pry::Config).should == true + config.is_a?(Pry::Config).should.be_true end it 'should get full config object, when using a proc array' do @@ -15,21 +15,22 @@ describe "Prompts" do redirect_pry_io(InputTester.new("exit-all")) do Pry.start(self, :prompt => [proc { |v| config1 = v }, proc { |v| config2 = v }]) end - config1.is_a?(Pry::Config).should == true + config1.is_a?(Pry::Config).should.be_true end it 'should receive correct data in the config object' do config = nil + o = Object.new redirect_pry_io(InputTester.new("def hello", "exit-all")) do - Pry.start(self, :prompt => proc { |v| config = v }) + Pry.start(o, :prompt => proc { |v| config = v }) end config.eval_string.should =~ /def hello/ config.nesting_level.should == 0 config.expr_number.should == 1 - config.cont.should == true - config._pry_.is_a?(Pry).should == true - config.object.should == self + config.cont.should.be_true + config._pry_.is_a?(Pry).should.be_true + config.object.should == o end end @@ -42,7 +43,7 @@ describe "Prompts" do end o.should == :test n.should == 0 - p.is_a?(Pry).should == true + p.is_a?(Pry).should.be_true end it 'should get 3 parameters, when using proc array' do @@ -55,7 +56,7 @@ describe "Prompts" do end o1.should == :test n1.should == 0 - p1.is_a?(Pry).should == true + p1.is_a?(Pry).should.be_true end end end |