I wrote a post about how to Unit testing your UIViewController been pushed properly
#import "UIViewController+MockUINavigationController.h"
- (void)testViewControllerBeenPushedProperly
{
CustomViewController *viewController = [[CustomViewController alloc] init];
[viewController pushIt];
[MKTVerify(viewController.navigationController) pushViewController:anything() animated:YES];
}
My matcher is OCHamcrest, mocking library is OCMockito.