Unit Testing Model Classes that inherit from NSManagedObject
- by Matt Baker
So...I'm trying to get unit tests set up in my iPhone App but I'm having some issues. I'm trying to test my model classes but they inherit directly from NSManagedObject. I'm sure this is a problem but I don't know how to get around it.
Everything is building and running as expected but I get this error when calling any method on the class I'm testing:
Unknown.m:0:0 unrecognized selector sent to instance 0xc2b120
If I follow this structure (http://chanson.livejournal.com/115621.html) to create my object in my tests I end up with another error entirely but it still doesn't help me.
Basically my question is this: how can I test a class that inherits from NSManagedObject?