Created
March 10, 2010 07:11
-
-
Save ivan3bx/327614 to your computer and use it in GitHub Desktop.
Stubbing HTTP status code with OCMock
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
NSInteger result = 401; | |
const void *val = &result; | |
id mockResponse = [OCMockObject mockForClass:[NSHTTPURLResponse class]]; | |
[[[mockResponse stub] andReturn:[NSValue value:val withObjCType:@encode(NSInteger)]] statusCode]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment