From 6c1aa55ab8b86c6b1c3d64bab84e2e7933fa6878 Mon Sep 17 00:00:00 2001 From: David Colucci Date: Fri, 28 Jul 2017 17:31:38 -0400 Subject: [PATCH] Fix #1432: add details around expectations.withArgs behavior to docs (#1501) --- docs/release-source/release/mocks.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/release-source/release/mocks.md b/docs/release-source/release/mocks.md index c75b17007..be7419f95 100644 --- a/docs/release-source/release/mocks.md +++ b/docs/release-source/release/mocks.md @@ -146,11 +146,15 @@ Expect the method to be called exactly `number` times. Expect the method to be called with the provided arguments and possibly others. +An `expectation` instance only holds onto a single set of arguments specified with `withArgs`. Subsequent calls will overwrite the previously-specified set of arguments (even if they are different), so it is generally not intended that this method be invoked more than once per test case. + #### `expectation.withExactArgs(arg1, arg2, ...);` Expect the method to be called with the provided arguments and no others. +An `expectation` instance only holds onto a single set of arguments specified with `withExactArgs`. Subsequent calls will overwrite the previously-specified set of arguments (even if they are different), so it is generally not intended that this method be invoked more than once per test case. + #### `expectation.on(obj);`