At my day job I\'ve been spoiled with Mockito\'s never() verification, which can confirm that a mock method is never called.
Is there some way to accomplish the same thi
You could also try something like this, a la JavaScript:
- (void)aMethod {
__block BOOL b = NO;
id mock = [OCMockObject mockForClass:[UIView class]];
[[[mock stub] andDo:^(NSInvocation *i) { b = YES; }] resignFirstResponder];
[mock resignFirstResponder];
NSLog(@"And b is: %i", b); // This reads "And b is: 1" on the console
}
I'm not sure if there are any leaks associated with this code. I got the idea from reading this page: http://thirdcog.eu/pwcblocks/