In this case, since you do not care about the value of rect, I would use:
[[[[popoverProvider expect] andReturn:mockRecipeIngredientViewController] ignoringNonObjectArgs]
showPopoverForAction:[OCMArg any]
fromRect:CGRectMake(0.0f,0.0f,0.0f,0.0f)
inView:[OCMArg any]
onDoneBlock:[OCMArg any]
];
If you had a case when you wanted to ignore one structure, but check another, you can do this:
[[[[[popoverProvider expect] andReturn:mockRecipeIngredientViewController] ignoringNonObjectArgs] andDo:^(NSInvocation *invocation) {
CGRect theSize;
[invocation getArgument:&theSize atIndex:6];
STAssertEquals(theSize, CGSizeMake(20.0f,20.0f), @"No match!");
}]
showPopoverForAction:[OCMArg any]
fromRect:CGRectMake(0.0f,0.0f,0.0f,0.0f)
inView:[OCMArg any]
onDoneBlock:[OCMArg any]
someSize:CGSizeMake(0.0f,0.0f)
];
source
share