-
-
Notifications
You must be signed in to change notification settings - Fork 769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sinon mock expectations do not remember multiple withArgs() or withExactArgs() calls. #992
Comments
Sounds like #984 |
It is correct that mocks only keep the last value of arguments to This has been the case since 84dbb22, which was committed on Apr 18, 2010. git log -S "this.expectedArguments = slice.call(arguments);" The same is true for I have created #1432 to document this issue |
@mroderick how would you test a loop over different objects if your mock can only accept the same parameters? |
With |
Issue #1193 also has a good explanation of this deficiency. |
Fixed by #1432 |
SInon 1.17.3 doesn't seem to work with mocks as expected. I would think that I can treat mocks like stubs, but the with*Args() methods seem to only remember the last invocation, it doesn't create an internal map of argument to return value like you get with stubs.
The text was updated successfully, but these errors were encountered: