Skip to content

Instantly share code, notes, and snippets.

@vikdenic
Created April 2, 2015 19:04
Show Gist options
  • Select an option

  • Save vikdenic/75cfe0b3091a787b7e11 to your computer and use it in GitHub Desktop.

Select an option

Save vikdenic/75cfe0b3091a787b7e11 to your computer and use it in GitHub Desktop.
XCTAssertEqualObjects
- (void)testFirstSuperHero {
XCTestExpectation *expectation = [self expectationWithDescription:@"Retrieving Superheroes"];
[SuperHero retrieveSuperHerosWithCompletion:^(NSArray *superHeros) {
SuperHero *firstHero = superHeros.firstObject;
NSLog(@"%@", firstHero.name);
XCTAssertEqualObjects(firstHero.name, @"Namor");
[expectation fulfill];
}];
[self waitForExpectationsWithTimeout:10.0 handler:nil];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment