I love the ability to provide an OCMArg which automagically invokes the provided block, especially given the asynchronous nature of much of our code base. However, providing protocol mocks as the arguments to these blocks crashes within NSInvocation+OCMAdditions.m.
I love the ability to provide an OCMArg which automagically invokes the provided block, especially given the asynchronous nature of much of our code base. However, providing protocol mocks as the arguments to these blocks crashes within NSInvocation+OCMAdditions.m.
Here is an example which crashes:
which crashes because the
mockProtocol
is a protocol mock. ModifyingmockProtocol
to be a class mock fixes the crash, and the test passes.We're using OCMock 3.3.
Console log:
Full stack trace: