Skip to content

Commit

Permalink
Simplified setting of isSatisfied.
Browse files Browse the repository at this point in the history
  • Loading branch information
erikdoe committed Feb 17, 2015
1 parent 0ce21a0 commit 5ac3e82
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Source/OCMock/OCMInvocationExpectation.m
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,16 @@ - (void)handleInvocation:(NSInvocation *)anInvocation
{
[super handleInvocation:anInvocation];

isSatisfied = !matchAndReject;
if(matchAndReject)
{
isSatisfied = NO;
[NSException raise:NSInternalInconsistencyException format:@"%@: explicitly disallowed method invoked: %@",
[self description], [anInvocation invocationDescription]];
}
else
{
isSatisfied = YES;
}
}

@end

0 comments on commit 5ac3e82

Please sign in to comment.