I'm trying to stub a method which has got an block argument.
[[[myMock stub] andCall:@selector(performBlock:) onObject:self] performBlock:[OCMArg any]];
The block is of a simple type.
typedef void (^MyBlock)(void);
Upon execution I get the following error:
unexpected method invoked: performBlock:<__NSStackBlock__: 0xbffff418>
stubbed: performBlock:<OCMAnyConstraint: 0x1c1ff70>
It seems as a block argument is not compatible with [OCMArg any]
. Any tipps how to stub this method then?