Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Add support for expecting a method to *not* be called. #7
This used to work, but it seems to have stopped at some point. What seems to be the problem is gently is treating the existence of an expectation as proof of a failure, but what we really care about is the existence of an expectation whose count is > 0. For example if I were to do:
To be sure that someObject.someFunction is never called, in the event that everything is working as intended and someObject.someFunction is not invoked, the expectation would still exist, and thus verify call would fail. After this patch, verify will only fail if expectations with a count > 0 still exist.
This time including a test case which I should've done to begin with, sorry about that ;).