You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That will pass even though it's obviously not what was intended. While this seems a little contrived, it's actually easier to fall into when using properties that themselves are being mocked so you have something like.
OCMExpect([foo bar])
OCMExpect([foo.bar bam])
We still do want to support the case however where foo.bar is not a stub.
I believe we should throw an assertion whenever the recorded stub is not the last invocation in the macro.
The text was updated successfully, but these errors were encountered:
Note that I'm preparing a fix for this. Just wanted to record the issue.
dmaclach
changed the title
Macros should enforce that recording of only one mock invocation
Macros should enforce recording of only one mock invocation
Jan 10, 2021
Right now it is possible to write code like:
That will pass even though it's obviously not what was intended. While this seems a little contrived, it's actually easier to fall into when using properties that themselves are being mocked so you have something like.
We still do want to support the case however where
foo.bar
is not a stub.I believe we should throw an assertion whenever the recorded stub is not the last invocation in the macro.
The text was updated successfully, but these errors were encountered: