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")
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
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
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