Skip to content

Instantly share code, notes, and snippets.

Created January 5, 2013 03:12
Show Gist options
  • Save anonymous/4459502 to your computer and use it in GitHub Desktop.
Save anonymous/4459502 to your computer and use it in GitHub Desktop.
Sneak peek at the new Mocky expectation syntax.
- (void)testCanExpectSingleMethodCallAndPass
{
id<SomeProtocol> testObject = [context protocolMock:@protocol(SomeProtocol)];
[context check:^{
[[expectThat(testObject) receives] doSomething];
}];
[testObject doSomething];
assertContextSatisfied();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment