-
Notifications
You must be signed in to change notification settings - Fork 9
Add ability to pass in a custom test bundle #32
Conversation
@vokal/ios-developers Would love a look at this - I've got some forthcoming stuff for the template which will allow us to use VOKMockURLProtocol easily with swift, and I tested with the Obj-C template app that this doesn't break anything obvious. |
you might need to bump up the travis Xcode version: it's failing on |
@chillpop Good catch. All better. |
This should be possible on Xcode 6.4 (I think). But regardless of Xcode 6.4 or 7, does the nullability decorator require a bump to the podspec ios version target? |
@@ -49,6 +49,12 @@ + (instancetype)containerWithResponse:(NSHTTPURLResponse *)response data:(NSData | |||
|
|||
@implementation VOKMockUrlProtocol | |||
|
|||
static NSBundle *testBundle = nil; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about setting testBundle = [NSBundle bundleForClass:[self class]]
here instead of checking below when it's used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because if for some reason someone nulls it out at any point I want it to pick up the test bundle again - although I suppose I could handle that case in setTestBundle
too...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point, it's fine as is
LGTM, aside from Carl's question about the target version |
It occurred to me that didn't actually need to be non-null. Change pushed. |
In that case you can lose the Xcode 7 requirement in the travis file. Other than that, LGTM |
@chillpop I'd rather keep that since waaaaay more people are going to be using that going forward. |
Fair enough. |
GTP? |
D'awwwwwwwwwwwwwww |
Add ability to pass in a custom test bundle
@chillpop you've out done yourself |
Mostly for Swifty fun. See the README for details.