NSInvocation - Calling Blocks

Because I always forget.

    id mockView = OCMClassMock([UIView class]);

    [[[[mockView stub] ignoringNonObjectArgs] andDo:^(NSInvocation *invocation) {
        __block void (^animationBlock)(void);
        [invocation getArgument:&animationBlock atIndex:3];
        animationBlock();
        __block void (^completionBlock)(BOOL);
        [invocation getArgument:&completionBlock atIndex:4];
        completionBlock(YES);
        
    }] animateWithDuration:0 animations:OCMOCK_ANY completion:OCMOCK_ANY];