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

Commit

Permalink
Improve language around
Browse files Browse the repository at this point in the history
  • Loading branch information
JonRowe committed Oct 24, 2022
1 parent d2d2040 commit 313f00e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions features/configuring_responses/mixed_responses.feature
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
Feature: Mixed responses

Use `and_invoke` to invoke a Proc when a message is received. Pass `and_invoke` multiple
Procs to have different behavior for consecutive calls. The final Proc will continue to be
Use `and_invoke` to invoke a callable when a message is received. Pass `and_invoke` multiple
callables to have different behavior for consecutive calls. The final callable will continue to be
called if the message is received additional times.

Note: The invoked callable will be invoked with any arguments, so it is recommended to use a `lambda`
or similar with the same arity as your method but you can use a `proc` if you do not care (e.g. when raising).

Scenario: Mixed responses
Given a file named "raises_and_then_returns.rb" with:
"""ruby
Expand Down

0 comments on commit 313f00e

Please sign in to comment.