It is not the best thing to do, but I would like to verify that a private method of an object is called, so I create a partial mock and add an expectation on the private method.
Synchronizer * sync = [[Synchronizer alloc] initWithCleanup:YES];
sync = [OCMockObject partialMockForObject:sync];
[[(id)sync expect] cleanupPreviousContents];
When I run the test, cleanupPreviousContents is not called but the test is still successful. Where is the bug ?
Regards, Quentin