Error compiling for unit test using google toolbox for mac

Hi my application runs fine but when I try to run the unit tests I am getting this error…

2010-10-19 00:27:49.919 AssignmentUnitTest[27988:903] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 
'*** -[NSURL initFileURLWithPath:]: nil string parameter'

Irony is I have searched the whole project & I dont have any similar line of code that uses **[NSURL initFileURLWithPath:]**

  • How to turn on/off airplane mode in IOS 5.1 using private API
  • Custom Core Data SectionNameKeyPath
  • UICollectionView contentOffset changes with custom layout
  • iOS 6 vs 7 appearance build settings
  • Calculate controlPoints while drawing in iOS
  • UIRefreshControl Background Color
  • I have pretty much wasted half of my day on it without any success.

    I am using coredata in the project & below is the screen shot with stack trace.

    Can anyone please guide me to the right direction.

    Thanks
    screen shot

    **EDIt : ** The solution to this problem is to add not only the .xcdatamodel file but the root file .xcdatamodeld. Core Data was having trouble finding my model so was displaying this error. Hope it helps somebody someday.

    2 Solutions Collect From Internet About “Error compiling for unit test using google toolbox for mac”

    Read the call stack in your screenshot. It says your managedObjectModel method sent [NSURL fileURLWithPath:], and that called initFileURLWithPath:. So, find the point where you sent [NSURL fileURLWithPath:] and fix your argument to that message.

    The argument you passed being invalid suggests that either you passed nil for the path (perhaps you tried to find the file in your bundle but it isn’t there or has a different name than you looked for), or you passed a pointer to an object that isn’t a string (perhaps you had a string but under-retained it and a different object was created in its place).

    There is a bug in some version(s) of the SDK that broke exception handling in the simulator.

    Can you run the tests on a device?