Permalink
Browse files

Adjusting tests for context notifications to depend on which platform…

… is running.
  • Loading branch information...
1 parent 6e2cfd8 commit 52aaff948727ac3785819266803ae3dbfbf2cee0 @casademora casademora committed Dec 11, 2011
@@ -323,9 +323,8 @@ + (NSManagedObjectContext *) MR_contextThatNotifiesDefaultContextOnMainThread;
(
MRLog(@"Using Private queue mode");
context = [[self alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType];
- [context performBlockAndWait:^{
- [context setPersistentStoreCoordinator:[NSPersistentStoreCoordinator MR_defaultStoreCoordinator]];
- }];
+ [context setParentContext:[NSManagedObjectContext MR_defaultContext]];
+
)
return context;
@@ -32,7 +32,12 @@ - (void) testCanNotifyDefaultContextOnSave
{
NSManagedObjectContext *testContext = [NSManagedObjectContext MR_contextThatNotifiesDefaultContextOnMainThread];
+ THREAD_ISOLATION_ENABLED(
assertThatBool([testContext MR_notifiesMainContextOnSave], is(equalToBool(YES)));
+ )
+ PRIVATE_QUEUES_ENABLED(
+ assertThat([testContext parentContext], is(equalTo([NSManagedObjectContext MR_defaultContext])));
+ )
}

0 comments on commit 52aaff9

Please sign in to comment.