I have an OCMock expectation that goes something like this:
id myValidator = [OCMockObject mockForClass: [MyValidator class]];
[[myValidator expect] validateField: @"value1"
target: testObject
selector: @selector(field:isValid:)];
Even when I make the call to validateField:target:selector: in the implementation, the verify of the mock fails. If, however, I replace the selector with NULL both in the implementation and the expectation, then the verify passes. Obviously, NULL isn’t what I want to use though. Pretty clearly the problem lies somewhere in the selector. Any idea why this might not be working, or how I can fix it?
I compiled all the OCMock code from source directly in my project, and this fixed the issue. Perhaps not the best solution, but it was at least a solution.