Pre Exam Test Practice (SSC | Banking | IAS | GATE | State Level | CLAT | Railways | Insurance | Teaching Exams | NDA | Defence | IES |State Exam )

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?


asked Sep 7, 2015 by rajesh
0 votes

Related Hot Questions

Government Jobs Opening