-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accessing the Config file in a Test Target #348
Comments
I believe it needs to be this way for Swift: #329 (previously it was not). Perhaps the best we can do is clearly document limitations, so that the workaround is clear. |
And why not to replace the -configDefinitionWithName: with -configDefinitionWithName:bundle:? I'm afraid that -configDefinitionWithName: in its current form will be useless and produce untypical bugs when accidentally used in the test target. |
That might be best actually. We can leave the old method there, but deprecate it. Or simply document that it implies the main bundle. |
Fine, I'll make the PR in a couple of days. |
Thanks so much. When can push a micro release when ready. |
Hi!
I've encountered a problem with using TyphoonConfig in a Test Target. When we load the config file by calling -useResourceWithName: method, [NSBundle mainBundle] is used under the hood. According to this SO answer, the config file cannot be found in the Test Target.
There is a workaround - I use the -useResourceWithPath: method, and generate the path using [NSBundle bundleForClass:].
Is this the desired behavior, or should I make a PR?
The text was updated successfully, but these errors were encountered: