Skip to content

Commit 75adcf5

Browse files
committed
Checked in, problem with in memory stores.
1 parent b01ee25 commit 75adcf5

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

MagicalRecord/Categories/NSManagedObjectContext/NSManagedObjectContext+MagicalRecord.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ + (void)MR_makeContext:(NSManagedObjectContext *)sourceContext mergeChangesToCon
7777
object:sourceContext
7878
queue:nil
7979
usingBlock:^(NSNotification *note) {
80+
NSAssert(note.object != nil, nil);
81+
NSAssert(targetContext!= nil, nil);
82+
8083
[targetContext performBlock:^{
8184
[targetContext mergeChangesFromContextDidSaveNotification:note];
8285
}];

MagicalRecord/Categories/NSManagedObjectContext/NSManagedObjectContext+MagicalSaves.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ - (void) MR_saveErrorHandler:(void (^)(NSError *))errorCallback;
8282

8383
if (self == [[self class] MR_defaultContext])
8484
{
85-
[[[self class] MR_rootSavingContext] MR_saveInBackgroundErrorHandler:errorCallback];
85+
[[[self class] MR_rootSavingContext] MR_saveErrorHandler:errorCallback];
8686
}
8787
}
8888

Project Files/Unit Tests/MagicalDataImportTestCase.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ @implementation MagicalDataImportTestCase
1515

1616
- (void) setUp
1717
{
18+
NSLog(@"Setting up");
1819
[MagicalRecord setDefaultModelNamed:@"TestModel.momd"];
1920
[MagicalRecord setupCoreDataStackWithInMemoryStore];
2021
//[MagicalRecord setupCoreDataStack];
@@ -29,6 +30,7 @@ - (void) setUp
2930

3031
- (void) tearDown
3132
{
33+
NSLog(@"Tearing down");
3234
[MagicalRecord cleanUp];
3335
}
3436

0 commit comments

Comments
 (0)