I'm writing some tests with Specta/Expecta and have created a fresh Test target for my project. As part of one of the tests, I need to validate that certain files from a Folder Reference exist.
In my main target, I can do this and it locates the file as expected:
NSString* appJson = [[NSBundle mainBundle] pathForResource:@"ActionSheetTest" ofType:@"json"];
In my test target however, I cannot (appJson
is nil
). I've added the folder Tests
to my "Copy Bundle Resources" in the Test target as seen below, but it still doesn't load. What am I doing wrong? I've also tried setting pathForResource
to Tests/Controls/ActionSheetTest
(which actually makes more sense to me) but that doesn't work either.