I want to mock an object with the following message declaration:
- (void)createWithCompletion:(void (^)(FuseResult *result, NSError *err)) completion;
Is it possible to mock the block call this message has to handle?
I read the ArgumentCaptorTest which has block but I wasn't sure if it's relevant.
 
                        
Scroll down to the bottom of https://github.com/jonreid/OCMockito and you'll see "Capturing arguments for further assertions". The second example shows how to use
MKTArgumentCaptorto capture a block argument, then call it.Here's an example:
This doesn't make
mockObjectcall the block in any way. Instead, it captures the block passed tomockObject. The final step is to call the captured block with whatever arguments you want for your test.