Why should_receive failure?

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 expected :awesome with (any args) once, but
received it 0 times
./simple_spec.rb:13:

Finished in 0.006159 seconds

1 example, 1 failure


what’s wrong with my code?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs