Created
April 28, 2014 04:59
-
-
Save davertay/11362152 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
id mockTaskVC = [OCMockObject partialMockForObject:taskVC]; | |
[[mockTaskVC expect] showToastMessage:@"Task Started" completion:OCMOCK_ANY]; | |
[[[mockTaskVC reject] ignoringNonObjectArgs] displayAlertWithMsg:OCMOCK_ANY title:OCMOCK_ANY tag:-1]; | |
[taskVC toggleStartPauseResume:nil]; | |
// Idle the run loop until the background task is finished | |
[self.client waitForAllOperations]; | |
NSTimeInterval delay = 2.0; | |
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delay * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ | |
[mockTaskVC verify]; | |
NOTIFY_TESTS_DONE; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment