Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.4.0
-
Fix Version/s: 2.6.0
-
Component/s: JMock 2.x.x Library
-
Labels:None
-
Environment:all
-
Number of attachments :
Description
At present, Mockery.assertIsSatisfied() flushes any expectations errors that have been thrown during a test but that have not stopped it. Nat and I can't think of a case where there's a good reason to do this. The effect is that if an ExpectationError is thrown but caught and dropped by the code under test, then the test will pass. What we think /should/ happen is that such exceptions should be recorded (which they are) and rethrown if still present during verification.
This would invalidate CascadedFailuresAcceptanceTests.testSuccessfulVerifyClearsFirstFailure()
For JMock 1.x I provided a solution in
JMOCK-59using a monitor approach.JMOCK-59using a monitor approach.