Adjusting tests for context notifications to depend on which platform is running.

This commit is contained in:
Saul Mora
2011-12-11 13:16:46 -07:00
parent 6e2cfd8151
commit 52aaff9487
2 changed files with 7 additions and 3 deletions

View File

@@ -323,9 +323,8 @@ NSString * const kMagicalRecordDidMergeChangesFromiCloudNotification = @"kMagica
(
MRLog(@"Using Private queue mode");
context = [[self alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType];
[context performBlockAndWait:^{
[context setPersistentStoreCoordinator:[NSPersistentStoreCoordinator MR_defaultStoreCoordinator]];
}];
[context setParentContext:[NSManagedObjectContext MR_defaultContext]];
)
return context;

View File

@@ -32,7 +32,12 @@
{
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])));
)
}