SQFInMemoryContext
Quickly and easily create an in-memory context for Unit Testing Core Data entities.
Using
Install by either dragging the header and implementation files into your project, or by installing using CocoaPods:
pod 'SQFInMemoryContext'Import the convenience header.
#import <SQFInMemoryContext/SQFInMemoryContext.h>Instantiate a new context for your tests:
NSManagedObjectContext *moc = [NSManagedObjectContext memoryStoreForModel:@"MyCoreDataModel"];