Skip to content

Instantly share code, notes, and snippets.

@brendanjerwin
Created June 5, 2013 03:07
Show Gist options
  • Save brendanjerwin/5711346 to your computer and use it in GitHub Desktop.
Save brendanjerwin/5711346 to your computer and use it in GitHub Desktop.
I want to be able to easily mock an object with this kind of method. Its a service injected into my code under test.
-(void)doSomething:(NSObject)input success:(^())success;
Maybe something like:
MyService *mock = mock([MyService class]);
[given_thid_will([mock doSomething:any() success:nil]) do:^(success){
success();
}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment