From 313f00ec37e87463959977ba408eb33a65cef2a9 Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Mon, 10 Oct 2022 17:13:44 +0100 Subject: [PATCH] Improve language around --- features/configuring_responses/mixed_responses.feature | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/features/configuring_responses/mixed_responses.feature b/features/configuring_responses/mixed_responses.feature index 924dc596e..2ed1a94c7 100644 --- a/features/configuring_responses/mixed_responses.feature +++ b/features/configuring_responses/mixed_responses.feature @@ -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