• 1
(Deleted comment)

Difficulty with this code

Have there been any changes to the way this ought to work since you wrote it? I'm having a hell of a time getting unit testing to play nicely with Core Data. I don't want to pollute your comments with my inane problems, but would love some insight if you have the time.

Re: Difficulty with this code

There haven't been. What kinds of problems are you running into? Your best bet is to ask questions on either the Cocoa-Dev or the Xcode-Users mailing list, both of which are hosted by Apple.

Persistent store type

In your example, you do not stipulate the type of persistent storage. Is the default being memory?

Other question, would you initialize the core data stack in the unit test Setup method or somewhere else (e.g. initializer)?

Setting up a persistent store for testing

What is the best way to set up a persistent store for testing purposes?

Having trouble with this

I'm having trouble with exactly this. I have a question on StackOverflow that I believe you commented on: http://stackoverflow.com/questions/2842258/unit-testing-model-classes-that-inherit-from-nsmanagedobject.


this + http://stackoverflow.com/questions/1849802 = win! :)

Cool. Except that those are not unit tests. Now, I'm not saying they are not good tests, but definitely not unit tests.

  • 1

Log in