Ask a Question
Advertise on boostr.in
Organizational Research By
Surprising Reserch Topic
can ocmock run a block parameter using -'ios,unit-testing,ocmock'
can ocmock run a block parameter ¬†using -'ios,unit-testing,ocmock'
Assume a method signature such as the following:
- (void)theMethod:(void(^)(BOOL completed))completionBlock;
I would like to mock this method signature to ensure the method is called, and just call the completion block. ¬†I see from other posts like this one that I can mock the method call and accept any block, but not run the block. ¬†I also know there is a andDo method that I might be able to use, but I can't figure out how to pass a block in and run it. ¬†
Sep 7, 2015
to add a comment.
Related Hot Questions
Your name to display (optional):
Email me at this address if my answer is selected or commented on:
Email me if my answer is selected or commented on
Privacy: Your email address will only be used for sending these notifications.
To avoid this verification in future, please