Re: [rspec-users] why should_receive failure?

2009-07-14 Thread Julian Leviston
because "Peepcode.new" doesn't receive the "awesome" message. like it says... Julian. On 15/07/2009, at 12:59 PM, Zhenning Guan wrote: class PeepCode def awesome "awesome" end end describe PeepCode do it "should fuck" do PeepCode.new.should_receive(:awesome).and_return("awesome")

Re: [rspec-users] why should_receive failure?

2009-07-14 Thread David Chelimsky
On Tue, Jul 14, 2009 at 9:59 PM, Zhenning Guan wrote: > > class PeepCode >  def awesome >    "awesome" >  end > end > > describe PeepCode do >  it "should fuck" do >   PeepCode.new.should_receive(:awesome).and_return("awesome") >  end > end > > - > Spec::Mock

Re: [rspec-users] why should_receive failure?

2009-07-14 Thread Jim Gay
On Jul 14, 2009, at 10:59 PM, Zhenning Guan wrote: class PeepCode def awesome "awesome" end end describe PeepCode do it "should fuck" do peep = PeepCode.new peep.should_receive(:awesome).and_return("awesome") peep.awesome #this completes the expectation above # PeepCode.new.should_rece

[rspec-users] why should_receive failure?

2009-07-14 Thread Zhenning Guan
class PeepCode def awesome "awesome" end end describe PeepCode do it "should fuck" do PeepCode.new.should_receive(:awesome).and_return("awesome") end end - Spec::Mocks::MockExpectationError in 'PeepCode should fuck' # expected :awesome wit