Automatic verification of created mock objects.

Discussion of the OCMock framework. If you have patches we would prefer you to send them to the mailing list, but attaching them to a topic is possible, too.

Automatic verification of created mock objects.

Postby taoy » 10 Sep 2012, 08:30

Hi there,

Are there any plans (or is there already a way to) have OCMock automatically verify any created mocks at the end of the run? There is never a case where I create a mock, and I don't care that it was called or not. So, I'm having to add verifys for every mock by hand. This is actually a PITA, because it's easy to forget to verify, causing a test to succeed even if the implementation is wrong.

Also another feature that would be very welcome, is the ability to order mock expections globally rather than just on a per-mock basis. In a number of critical sections it's not only important which mock was called, but with complicated interaction sequences I want to make sure that everything happens in the order required. Currently it only appears that I can set an ordering expection on an individual mock object.

Is this something that you wouldn't mind supporting?

Posts: 4
Joined: 10 Sep 2012, 08:25

Return to OCMock