To add a collaborator to this project you will need to use the Relish gem to add the collaborator via a terminal command. Soon you'll be able to also add collaborators here!
More about adding a collaboratorSpy on an unstubbed method
Using have_received on an unstubbed method will never pass, so rspec-mocks
issues a helpful error message.
- Scenarios
-
- fail to verify a stubbed method
-
- Given
-
a file named "failed_spy_spec.rb" with:
describe "have_received" do it "raises a helpful error for unstubbed methods" do object = Object.new object.object_id object.should have_received(:object_id) end end
- When
-
I run
rspec failed_spy_spec.rb
- Then
- the output should contain "that method has not been stubbed"
Last published almost 7 years ago by myronmarston.