Re: getting path for files in test bundle
Re: getting path for files in test bundle
- Subject: Re: getting path for files in test bundle
- From: Fritz Anderson <email@hidden>
- Date: Thu, 14 Jul 2011 06:30:12 -0500
On 14 Jul 2011, at 2:11 AM, Wilker wrote:
> I'm trying to do some tests here, but in case my tests have some fixture
> files (video files), I added them to a group Fixtures on Test target, they
> are also already on Copy Resources Bundle phase, but I can't get the path
> for them... I'm trying with:
>
> NSString *dexterPath = [[NSBundle mainBundle] pathForResource:
> @"dexter" ofType:@"mp4"];
[NSBundle bundleForClass: [self class]]. The test suite runs in the context of the application under test, and is not in the main bundle.
Also, the group in which a file appears in the Project navigator has no influence over its role in the product; that's a matter for the build phases.
— F
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden