• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSBundle wierdness in OCUnit target:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSBundle wierdness in OCUnit target:


  • Subject: Re: NSBundle wierdness in OCUnit target:
  • From: Nir Soffer <email@hidden>
  • Date: Tue, 11 Mar 2008 06:56:17 +0200


On Mar 11, 2008, at 01:44, William Hunt wrote:

Well, I think I've traced the weirdness I was previously having with the model down to the following...

When I call:

NSLog( @"bundlePath: %@", [[NSBundle mainBundle] bundlePath] );

I get:

2008-03-10 16:41:18.565 otest[3819:80f] bundlePath: /Developer/Tools

This is clearly not correct. (I get the correct path to my .app bundle when I run my normal target.) Is there a setting in the target that changes the bundle path?


If you want to use test code that works with both dependent (injected) and independent tests target, use:

	NSBundle *testBundle = [NSBundle bundleForClass:[SomeClass class]];

SomeClass is either in the test bundle or in the tested code.


Best Regards,

Nir Soffer

_______________________________________________

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


References: 
 >NSBundle wierdness in OCUnit target: (From: William Hunt <email@hidden>)

  • Prev by Date: Re: MPTask equivalent?
  • Next by Date: Cocoa way to get list of user accounts?
  • Previous by thread: Re: NSBundle wierdness in OCUnit target:
  • Next by thread: Missing Rule For xcdatamodel In Core Data App
  • Index(es):
    • Date
    • Thread