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'
#PeepCode:0xb7aa3bbc
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
#
On Tue, Jul 14, 2009 at 9:59 PM, Zhenning Guanli...@ruby-forum.com 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
-
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)
end
end