You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Observer mocks are not supported by the (now not so) new syntax with macros. The documentation deliberately shows only the selector-based syntax: http://ocmock.org/reference/#observer-mocks
I'll leave this issue open as a reminder that I should add something for observer mocks to make them work with the new syntax.
The underlying issue is that the macro always creates a recorder for normal methods (
When I got to the release of OCMock 3, I couldn't think of a good way to resolve this, short of merging the observer recorder functionality into the other recorder, which I didn't like. Any ideas?
In short, this doesn't work (returns "unrecognized selector sent to instance"):
But this (the old syntax) does...
Omitting the
userInfo:
parameter in the first example works provided that the notification sendsnil
for userInfo.The text was updated successfully, but these errors were encountered: