Skip to content
This repository has been archived by the owner on Dec 12, 2019. It is now read-only.

Add ability to pass in a custom test bundle #32

Merged
merged 5 commits into from
Oct 8, 2015

Conversation

designatednerd
Copy link
Contributor

Mostly for Swifty fun. See the README for details.

@designatednerd
Copy link
Contributor Author

@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.

@chillpop
Copy link
Contributor

chillpop commented Oct 7, 2015

you might need to bump up the travis Xcode version: it's failing on __nonnull

@designatednerd
Copy link
Contributor Author

@chillpop Good catch. All better.

@chillpop
Copy link
Contributor

chillpop commented Oct 7, 2015

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;
Copy link
Contributor

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?

Copy link
Contributor Author

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...

Copy link
Contributor

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

@brockboland
Copy link
Contributor

LGTM, aside from Carl's question about the target version

@designatednerd
Copy link
Contributor Author

It occurred to me that didn't actually need to be non-null. Change pushed.

@chillpop
Copy link
Contributor

chillpop commented Oct 8, 2015

In that case you can lose the Xcode 7 requirement in the travis file. Other than that, LGTM

@designatednerd
Copy link
Contributor Author

@chillpop I'd rather keep that since waaaaay more people are going to be using that going forward.

@chillpop
Copy link
Contributor

chillpop commented Oct 8, 2015

Fair enough.

@designatednerd
Copy link
Contributor Author

GTP?

@chillpop
Copy link
Contributor

chillpop commented Oct 8, 2015

goat to pull 5

@designatednerd
Copy link
Contributor Author

D'awwwwwwwwwwwwwww

designatednerd added a commit that referenced this pull request Oct 8, 2015
Add ability to pass in a custom test bundle
@designatednerd designatednerd merged commit fc33f02 into vokal:master Oct 8, 2015
@naomihimley
Copy link

@chillpop you've out done yourself

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants