Skip to content
This repository was archived by the owner on Sep 12, 2018. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Classes/CoreDataManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

@interface CoreDataManager : NSObject

@property (readonly, nonatomic) NSManagedObjectContext *managedObjectContext;
@property (strong, nonatomic) NSManagedObjectContext *managedObjectContext;
@property (readonly, nonatomic) NSManagedObjectModel *managedObjectModel;
@property (readonly, strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "321DCA4D7AEF437AB00D4390"
BlueprintIdentifier = "725FBA16121447FC862C9452"
BuildableName = "libPods.a"
BlueprintName = "Pods"
ReferencedContainer = "container:Pods/Pods.xcodeproj">
Expand All @@ -28,7 +28,7 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E8B7FE13184843A48E76BE6C"
BlueprintIdentifier = "D6EBB66D6B7C4F9C80919710"
BuildableName = "libPods-SampleProjectTests.a"
BlueprintName = "Pods-SampleProjectTests"
ReferencedContainer = "container:Pods/Pods.xcodeproj">
Expand Down
8 changes: 7 additions & 1 deletion Example/SampleProjectTests/CoreDataManagerTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,13 @@ void resetCoreDataStack(CoreDataManager *manager) {
NSPersistentStore *store = [manager.persistentStoreCoordinator persistentStores][0];
[[store.URL.absoluteString should] endWithString:@".sqlite"];
});


it(@"permits to set custom ManagedObjectContext", ^{
NSManagedObjectContext *newContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType];
manager.managedObjectContext = newContext;
[[manager.managedObjectContext should] equal:newContext];
});

});

SPEC_END