Sha256: a09a64de5cc5d6b7b1ae1d336c42a7125e228bc25940245378d16b8310c95785
Contents?: true
Size: 1006 Bytes
Versions: 5
Compression:
Stored size: 1006 Bytes
Contents
When [allowing](./basics/allowing-messages) or [expecting](./basics/expecting-messages) messages, the default response is to return `nil`. Several methods are provided to configure how the test double responds to the message. * <a href="./configuring-responses/returning-a-value">`and_return`</a> * <a href="./configuring-responses/raising-an-error">`and_raise`</a> * <a href="./configuring-responses/mixed-responses">`and_invoke`</a> * <a href="./configuring-responses/throwing">`and_throw`</a> * <a href="./configuring-responses/yielding">`and_yield`</a> * <a href="./configuring-responses/calling-the-original-implementation">`and_call_original`</a> * <a href="./configuring-responses/wrapping-the-original-implementation">`and_wrap_original`</a> In addition, you can provide a [block implementation](./configuring-responses/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.
Version data entries
5 entries across 5 versions & 1 rubygems