Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit fcb2524

Browse files
pirjJonRowe
andcommitted
Improve docs
Co-authored-by: Jon Rowe <[email protected]>
1 parent 83cff20 commit fcb2524

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

features/configuring_responses/mixed_responses.feature

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,9 @@ Feature: Mixed responses
44
callables to have different behavior for consecutive calls. The final callable will continue to be
55
called if the message is received additional times.
66

7-
Note: The invoked callable will be invoked with the calls arguments, so it is recommended to
8-
use a `lambda` or similar with the same arity as your method but you can use a `proc` if you
9-
do not care about arity (e.g. when raising).
10-
11-
Note: You can also use `and_invoke` to yield. In this case, use a `proc` with a `&block`
12-
parameter.
7+
Note: The invoked callable will be supplied the calls arguments, including any blocks (so `yield`
8+
et al will be supported). It is recommended to use a `lambda` or similar with the same arity
9+
as your method but you can use a `proc` if you do not care about arity(e.g. when raising).
1310

1411
Scenario: Mixed responses
1512
Given a file named "raises_and_then_returns.rb" with:

0 commit comments

Comments
 (0)