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.  

Any ideas?

Thanks.
    
asked Sep 7, 2015 by rajesh
0 votes
7 views



Related Hot Questions



Government Jobs Opening


...