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 collaboratorConfiguring responses
When allowing or expecting messages, the default response is to return nil
. Several
methods are provided to configure how the test double responds to the message.
In addition, you can provide a block implementation to respond in any manner you wish.
Note: for simplicity, the examples here use allow
rather than expect
, but these APIs apply equally to both cases.
Topics
- Returning a value
- Raising an error
- Throwing
- Yielding
- Calling the original implementation
- Wrapping the original implementation
- Block implementation
- Mixed responses
Last published 3 months ago by Jon Rowe.