spec/isolation_spec.rb in casualjim-caricature-0.3.0 vs spec/isolation_spec.rb in casualjim-caricature-0.3.1

- old
+ new

@@ -64,21 +64,21 @@ describe "when asked to stub a method" do it "should create an expectation with a block" do nm = "What's in a name" - expectation = @isolator.when_told_to(:name) do |cl| + expectation = @isolator.when_receiving(:name) do |cl| cl.return(nm) end expectation.method_name.should.equal :name expectation.has_return_value?.should.be.true? expectation.return_value.should.equal nm end it "should create an expectation without a block" do nm = "What's in a name" - expectation = @isolator.when_told_to(:name).return(nm) + expectation = @isolator.when_receiving(:name).return(nm) expectation.method_name.should.equal :name expectation.has_return_value?.should.be.true? expectation.return_value.should.equal nm end end @@ -105,20 +105,20 @@ describe "when asked to stub a method" do it "should create an expectation with a block" do nm = "What's in a name" - expectation = @isolator.when_told_to(:name) do |cl| + expectation = @isolator.when_receiving(:name) do |cl| cl.return(nm) end expectation.method_name.should.equal :name expectation.has_return_value?.should.be.true? expectation.return_value.should.equal nm end it "should create an expectation without a block" do nm = "What's in a name" - expectation = @isolator.when_told_to(:name).return(nm) + expectation = @isolator.when_receiving(:name).return(nm) expectation.method_name.should.equal :name expectation.has_return_value?.should.be.true? expectation.return_value.should.equal nm end end \ No newline at end of file