If we fail to mock the method -myMethod of the class MyClass and we are testing a piece of code that uses -myMethod, we will get the message:
-[MyTestClass myTestMethod] failed
OCMockObject[MyClass]:unexpected method invoked: myMethod
for the test class MyTestClass and test method myTestMethod. The error is just fine, however Xcode 5.1 with XCTest does not know where to direct the programmer as the context of the failing call is not given to Xcode. In the issues panel, we will see the location reported as <unknown>, which for larger tests makes this very hard to see where this unexpected method is being invoked. The problem is that the exception comes from the linked binary and not from the call site.
Is this possible to get the exception to happen at the call site and not buried in OCMockObject -handleInvocation? Any work or plan on this? I am guessing (hoping?) there is some way to encode the call location. More than happy to pitch in on this.