In my iOS app, I have a library (that I cannot edit) that grabs something from the app's info-plist file. The library uses this code to get the plist:
infoDict = [[NSBundle bundleForClass:[self class]] infoDictionary];
In the app, it works great. But when I run a unit test that uses the same method, the line above returns the info-plist of the Tests bundle instead of the main one. What can I do in my unit test to get around this, since I can't change the code above?
Aucun commentaire:
Enregistrer un commentaire