Closed mllrjb closed 11 years ago
Hi!
That sounds like a good thing to have, and should be fairly simple to add. Would you like to submit a pull request?
Cheers, Chris
Actually - this was a good way to remind myself of the codebase. So I just added atLeast & atMost verifiers.
It doesn't look like there is a way to verify that there were 'at least' or an 'unknown' number of interactions with a mock.
For example, I want to verify that foo.bar() got called at least once, but don't care when else it got called. Having to verify the actual number of times can lead to fragile code.
I run into this frequently, when I'm doing a check/set of a value between two objects, and testing the logic that handles the check/set. I want to verify the check and set got called, but don't care how many times the check ran.