spec/confstruct/utils_spec.rb in confstruct-1.0.2 vs spec/confstruct/utils_spec.rb in confstruct-1.1.0

- old
+ new

@@ -4,23 +4,23 @@ before :each do @obj = double('obj') end it "should instance_eval when the block takes no params" do - @obj.should_receive(:test).and_return('OK') - eval_or_yield(@obj) { + expect(@obj).to receive(:test_method).and_return('OK') + eval_or_yield(@obj) { self.should_not == @obj - self.test.should == 'OK' + self.test_method.should == 'OK' } end it "should yield when the block takes a param" do - @obj.should_receive(:test).and_return('OK') + expect(@obj).to receive(:test_method).and_return('OK') eval_or_yield(@obj) { |o| self.should_not == @obj o.should == @obj - lambda { self.test }.should raise_error(NoMethodError) - o.test.should == 'OK' + lambda { self.test_method }.should raise_error(NoMethodError) + o.test_method.should == 'OK' } end it "should return the object when no block is given" do eval_or_yield(@obj).should == @obj