stub - iOS OCMock call back method with parameter -


i want use ocmock such whenever somemethod called argument, calls callbackmethod: argument "dict", nsdictionary. found andcall:onobject: doesn't seem let pass argument. there way desired behavior?

you can use anddo: , execute whatever want in given block.

id yourmock;//... nsdictionary *dictionary;//... id anobject;//...  [[[yourmock stub] anddo:^(nsinvocation *invocation) {     [anobject callbackmethod:dictionary]; }] somemethod]; 

Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -