Skip to content
This repository
Browse code

Making background save asynchronous and fix the callback not firing

  • Loading branch information...
commit 22311b77361930fd666fd259b1bf4f53015a3724 1 parent c8ef686
Stephen Vanterpool blackgold9 authored
29 MagicalRecord/Categories/NSManagedObjectContext/NSManagedObjectContext+MagicalSaves.m
@@ -29,18 +29,20 @@ - (void) MR_saveWithErrorCallback:(void(^)(NSError *))errorCallback;
29 29 }
30 30
31 31 MRLog(@"-> Saving %@", [self MR_description]);
32   -
33   - NSError *error = nil;
34   - BOOL saved = NO;
  32 +
  33 + __block NSError *error = nil;
  34 + __block BOOL saved = NO;
35 35 @try
36 36 {
37   - saved = [self save:&error];
  37 + [self performBlockAndWait:^{
  38 + saved = [self save:&error];
  39 + }];
38 40 }
39 41 @catch (NSException *exception)
40 42 {
41 43 MRLog(@"Unable to perform save: %@", (id)[exception userInfo] ?: (id)[exception reason]);
42 44 }
43   - @finally
  45 + @finally
44 46 {
45 47 if (!saved)
46 48 {
@@ -71,7 +73,7 @@ - (void) MR_saveNestedContextsErrorHandler:(void (^)(NSError *))errorCallback;
71 73
72 74 - (void) MR_save;
73 75 {
74   - [self MR_saveErrorHandler:nil];
  76 + [self MR_saveErrorHandler:nil];
75 77 }
76 78
77 79 - (void) MR_saveErrorHandler:(void (^)(NSError *))errorCallback;
@@ -82,7 +84,8 @@ - (void) MR_saveErrorHandler:(void (^)(NSError *))errorCallback;
82 84
83 85 if (self == [[self class] MR_defaultContext])
84 86 {
85   - [[[self class] MR_rootSavingContext] MR_saveInBackgroundErrorHandler:errorCallback];
  87 + // Since this is a synchronous call, I made the background context save synchronous as well to reflect the intent.
  88 + [[[self class] MR_rootSavingContext] MR_saveErrorHandler:errorCallback];
86 89 }
87 90 }
88 91
@@ -98,16 +101,16 @@ - (void) MR_saveInBackgroundErrorHandler:(void (^)(NSError *))errorCallback;
98 101
99 102 - (void) MR_saveInBackgroundErrorHandler:(void (^)(NSError *))errorCallback completion:(void (^)(void))completion;
100 103 {
101   - [self performBlockAndWait:^{
  104 + [self performBlock:^{
  105 + // Save the context
102 106 [self MR_saveWithErrorCallback:errorCallback];
103   -
  107 +
  108 + // If we're the default context, save to disk too (the user expects it to persist)
104 109 if (self == [[self class] MR_defaultContext])
105 110 {
106 111 [[[self class] MR_rootSavingContext] MR_saveInBackgroundErrorHandler:errorCallback completion:completion];
107   - }
108   -
109   - if (completion && self == [[self class] MR_rootSavingContext])
110   - {
  112 + } else {
  113 + // If we are not the default context (And therefore need to save the root context, do the completion action if one was specified
111 114 if (completion)
112 115 {
113 116 dispatch_async(dispatch_get_main_queue(), completion);
251 Project Files/Magical Record.xcodeproj/project.pbxproj
@@ -7,6 +7,62 @@
7 7 objects = {
8 8
9 9 /* Begin PBXBuildFile section */
  10 + 4B7116FD15F8EE4600B64426 /* EXPBackwardCompatibility.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116C215F8EE4600B64426 /* EXPBackwardCompatibility.m */; };
  11 + 4B7116FE15F8EE4600B64426 /* EXPBackwardCompatibility.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116C215F8EE4600B64426 /* EXPBackwardCompatibility.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  12 + 4B7116FF15F8EE4600B64426 /* EXPBlockDefinedMatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116C415F8EE4600B64426 /* EXPBlockDefinedMatcher.m */; };
  13 + 4B71170015F8EE4600B64426 /* EXPBlockDefinedMatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116C415F8EE4600B64426 /* EXPBlockDefinedMatcher.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  14 + 4B71170115F8EE4600B64426 /* EXPDoubleTuple.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116C715F8EE4600B64426 /* EXPDoubleTuple.m */; };
  15 + 4B71170215F8EE4600B64426 /* EXPDoubleTuple.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116C715F8EE4600B64426 /* EXPDoubleTuple.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  16 + 4B71170315F8EE4600B64426 /* Expecta.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116CA15F8EE4600B64426 /* Expecta.m */; };
  17 + 4B71170415F8EE4600B64426 /* Expecta.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116CA15F8EE4600B64426 /* Expecta.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  18 + 4B71170515F8EE4600B64426 /* ExpectaSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116CC15F8EE4600B64426 /* ExpectaSupport.m */; };
  19 + 4B71170615F8EE4600B64426 /* ExpectaSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116CC15F8EE4600B64426 /* ExpectaSupport.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  20 + 4B71170715F8EE4600B64426 /* EXPExpect.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116CE15F8EE4600B64426 /* EXPExpect.m */; };
  21 + 4B71170815F8EE4600B64426 /* EXPExpect.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116CE15F8EE4600B64426 /* EXPExpect.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  22 + 4B71170915F8EE4600B64426 /* EXPFloatTuple.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116D015F8EE4600B64426 /* EXPFloatTuple.m */; };
  23 + 4B71170A15F8EE4600B64426 /* EXPFloatTuple.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116D015F8EE4600B64426 /* EXPFloatTuple.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  24 + 4B71170B15F8EE4600B64426 /* EXPUnsupportedObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116D315F8EE4600B64426 /* EXPUnsupportedObject.m */; };
  25 + 4B71170C15F8EE4600B64426 /* EXPUnsupportedObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116D315F8EE4600B64426 /* EXPUnsupportedObject.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  26 + 4B71170D15F8EE4600B64426 /* EXPMatcherHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116D615F8EE4600B64426 /* EXPMatcherHelpers.m */; };
  27 + 4B71170E15F8EE4600B64426 /* EXPMatcherHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116D615F8EE4600B64426 /* EXPMatcherHelpers.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  28 + 4B71170F15F8EE4600B64426 /* EXPMatchers+beCloseTo.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116D815F8EE4600B64426 /* EXPMatchers+beCloseTo.m */; };
  29 + 4B71171015F8EE4600B64426 /* EXPMatchers+beCloseTo.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116D815F8EE4600B64426 /* EXPMatchers+beCloseTo.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  30 + 4B71171115F8EE4600B64426 /* EXPMatchers+beFalsy.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116DA15F8EE4600B64426 /* EXPMatchers+beFalsy.m */; };
  31 + 4B71171215F8EE4600B64426 /* EXPMatchers+beFalsy.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116DA15F8EE4600B64426 /* EXPMatchers+beFalsy.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  32 + 4B71171315F8EE4600B64426 /* EXPMatchers+beGreaterThan.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116DC15F8EE4600B64426 /* EXPMatchers+beGreaterThan.m */; };
  33 + 4B71171415F8EE4600B64426 /* EXPMatchers+beGreaterThan.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116DC15F8EE4600B64426 /* EXPMatchers+beGreaterThan.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  34 + 4B71171515F8EE4600B64426 /* EXPMatchers+beGreaterThanOrEqualTo.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116DE15F8EE4600B64426 /* EXPMatchers+beGreaterThanOrEqualTo.m */; };
  35 + 4B71171615F8EE4600B64426 /* EXPMatchers+beGreaterThanOrEqualTo.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116DE15F8EE4600B64426 /* EXPMatchers+beGreaterThanOrEqualTo.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  36 + 4B71171715F8EE4600B64426 /* EXPMatchers+beIdenticalTo.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116E015F8EE4600B64426 /* EXPMatchers+beIdenticalTo.m */; };
  37 + 4B71171815F8EE4600B64426 /* EXPMatchers+beIdenticalTo.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116E015F8EE4600B64426 /* EXPMatchers+beIdenticalTo.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  38 + 4B71171915F8EE4600B64426 /* EXPMatchers+beInstanceOf.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116E215F8EE4600B64426 /* EXPMatchers+beInstanceOf.m */; };
  39 + 4B71171A15F8EE4600B64426 /* EXPMatchers+beInstanceOf.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116E215F8EE4600B64426 /* EXPMatchers+beInstanceOf.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  40 + 4B71171B15F8EE4600B64426 /* EXPMatchers+beInTheRangeOf.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116E415F8EE4600B64426 /* EXPMatchers+beInTheRangeOf.m */; };
  41 + 4B71171C15F8EE4600B64426 /* EXPMatchers+beInTheRangeOf.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116E415F8EE4600B64426 /* EXPMatchers+beInTheRangeOf.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  42 + 4B71171D15F8EE4600B64426 /* EXPMatchers+beKindOf.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116E615F8EE4600B64426 /* EXPMatchers+beKindOf.m */; };
  43 + 4B71171E15F8EE4600B64426 /* EXPMatchers+beKindOf.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116E615F8EE4600B64426 /* EXPMatchers+beKindOf.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  44 + 4B71171F15F8EE4600B64426 /* EXPMatchers+beLessThan.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116E815F8EE4600B64426 /* EXPMatchers+beLessThan.m */; };
  45 + 4B71172015F8EE4600B64426 /* EXPMatchers+beLessThan.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116E815F8EE4600B64426 /* EXPMatchers+beLessThan.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  46 + 4B71172115F8EE4600B64426 /* EXPMatchers+beLessThanOrEqualTo.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116EA15F8EE4600B64426 /* EXPMatchers+beLessThanOrEqualTo.m */; };
  47 + 4B71172215F8EE4600B64426 /* EXPMatchers+beLessThanOrEqualTo.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116EA15F8EE4600B64426 /* EXPMatchers+beLessThanOrEqualTo.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  48 + 4B71172315F8EE4600B64426 /* EXPMatchers+beNil.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116EC15F8EE4600B64426 /* EXPMatchers+beNil.m */; };
  49 + 4B71172415F8EE4600B64426 /* EXPMatchers+beNil.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116EC15F8EE4600B64426 /* EXPMatchers+beNil.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  50 + 4B71172515F8EE4600B64426 /* EXPMatchers+beSubclassOf.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116EE15F8EE4600B64426 /* EXPMatchers+beSubclassOf.m */; };
  51 + 4B71172615F8EE4600B64426 /* EXPMatchers+beSubclassOf.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116EE15F8EE4600B64426 /* EXPMatchers+beSubclassOf.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  52 + 4B71172715F8EE4600B64426 /* EXPMatchers+beTruthy.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116F015F8EE4600B64426 /* EXPMatchers+beTruthy.m */; };
  53 + 4B71172815F8EE4600B64426 /* EXPMatchers+beTruthy.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116F015F8EE4600B64426 /* EXPMatchers+beTruthy.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  54 + 4B71172915F8EE4600B64426 /* EXPMatchers+contain.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116F215F8EE4600B64426 /* EXPMatchers+contain.m */; };
  55 + 4B71172A15F8EE4600B64426 /* EXPMatchers+contain.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116F215F8EE4600B64426 /* EXPMatchers+contain.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  56 + 4B71172B15F8EE4600B64426 /* EXPMatchers+equal.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116F415F8EE4600B64426 /* EXPMatchers+equal.m */; };
  57 + 4B71172C15F8EE4600B64426 /* EXPMatchers+equal.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116F415F8EE4600B64426 /* EXPMatchers+equal.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  58 + 4B71172D15F8EE4600B64426 /* EXPMatchers+haveCountOf.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116F615F8EE4600B64426 /* EXPMatchers+haveCountOf.m */; };
  59 + 4B71172E15F8EE4600B64426 /* EXPMatchers+haveCountOf.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116F615F8EE4600B64426 /* EXPMatchers+haveCountOf.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  60 + 4B71172F15F8EE4600B64426 /* EXPMatchers+raise.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116F815F8EE4600B64426 /* EXPMatchers+raise.m */; };
  61 + 4B71173015F8EE4600B64426 /* EXPMatchers+raise.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116F815F8EE4600B64426 /* EXPMatchers+raise.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  62 + 4B71173115F8EE4600B64426 /* NSValue+Expecta.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116FC15F8EE4600B64426 /* NSValue+Expecta.m */; };
  63 + 4B71173215F8EE4600B64426 /* NSValue+Expecta.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116FC15F8EE4600B64426 /* NSValue+Expecta.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  64 + 4B71173315F9149900B64426 /* SaveTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116BC15F8ED5A00B64426 /* SaveTests.m */; };
  65 + 4B71173415F914A400B64426 /* SaveTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7116BC15F8ED5A00B64426 /* SaveTests.m */; };
10 66 C70B6E7113D0F62500709450 /* NSPersisentStoreHelperTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C70B6E7013D0F62500709450 /* NSPersisentStoreHelperTests.m */; };
11 67 C70B6E7413D0F64000709450 /* NSPersistentStoreCoordinatorHelperTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C70B6E7313D0F64000709450 /* NSPersistentStoreCoordinatorHelperTests.m */; };
12 68 C70B6E7713D0F66000709450 /* NSManagedObjectModelHelperTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C70B6E7613D0F66000709450 /* NSManagedObjectModelHelperTests.m */; };
@@ -234,6 +290,67 @@
234 290 /* End PBXCopyFilesBuildPhase section */
235 291
236 292 /* Begin PBXFileReference section */
  293 + 4B7116BB15F8ED5A00B64426 /* SaveTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SaveTests.h; path = "Unit Tests/SaveTests.h"; sourceTree = "<group>"; };
  294 + 4B7116BC15F8ED5A00B64426 /* SaveTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SaveTests.m; path = "Unit Tests/SaveTests.m"; sourceTree = "<group>"; };
  295 + 4B7116C115F8EE4600B64426 /* EXPBackwardCompatibility.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EXPBackwardCompatibility.h; sourceTree = "<group>"; };
  296 + 4B7116C215F8EE4600B64426 /* EXPBackwardCompatibility.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EXPBackwardCompatibility.m; sourceTree = "<group>"; };
  297 + 4B7116C315F8EE4600B64426 /* EXPBlockDefinedMatcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EXPBlockDefinedMatcher.h; sourceTree = "<group>"; };
  298 + 4B7116C415F8EE4600B64426 /* EXPBlockDefinedMatcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EXPBlockDefinedMatcher.m; sourceTree = "<group>"; };
  299 + 4B7116C515F8EE4600B64426 /* EXPDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EXPDefines.h; sourceTree = "<group>"; };
  300 + 4B7116C615F8EE4600B64426 /* EXPDoubleTuple.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EXPDoubleTuple.h; sourceTree = "<group>"; };
  301 + 4B7116C715F8EE4600B64426 /* EXPDoubleTuple.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EXPDoubleTuple.m; sourceTree = "<group>"; };
  302 + 4B7116C815F8EE4600B64426 /* Expecta-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Expecta-Prefix.pch"; sourceTree = "<group>"; };
  303 + 4B7116C915F8EE4600B64426 /* Expecta.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Expecta.h; sourceTree = "<group>"; };
  304 + 4B7116CA15F8EE4600B64426 /* Expecta.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Expecta.m; sourceTree = "<group>"; };
  305 + 4B7116CB15F8EE4600B64426 /* ExpectaSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExpectaSupport.h; sourceTree = "<group>"; };
  306 + 4B7116CC15F8EE4600B64426 /* ExpectaSupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExpectaSupport.m; sourceTree = "<group>"; };
  307 + 4B7116CD15F8EE4600B64426 /* EXPExpect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EXPExpect.h; sourceTree = "<group>"; };
  308 + 4B7116CE15F8EE4600B64426 /* EXPExpect.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EXPExpect.m; sourceTree = "<group>"; };
  309 + 4B7116CF15F8EE4600B64426 /* EXPFloatTuple.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EXPFloatTuple.h; sourceTree = "<group>"; };
  310 + 4B7116D015F8EE4600B64426 /* EXPFloatTuple.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EXPFloatTuple.m; sourceTree = "<group>"; };
  311 + 4B7116D115F8EE4600B64426 /* EXPMatcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EXPMatcher.h; sourceTree = "<group>"; };
  312 + 4B7116D215F8EE4600B64426 /* EXPUnsupportedObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EXPUnsupportedObject.h; sourceTree = "<group>"; };
  313 + 4B7116D315F8EE4600B64426 /* EXPUnsupportedObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EXPUnsupportedObject.m; sourceTree = "<group>"; };
  314 + 4B7116D515F8EE4600B64426 /* EXPMatcherHelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EXPMatcherHelpers.h; sourceTree = "<group>"; };
  315 + 4B7116D615F8EE4600B64426 /* EXPMatcherHelpers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EXPMatcherHelpers.m; sourceTree = "<group>"; };
  316 + 4B7116D715F8EE4600B64426 /* EXPMatchers+beCloseTo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "EXPMatchers+beCloseTo.h"; sourceTree = "<group>"; };
  317 + 4B7116D815F8EE4600B64426 /* EXPMatchers+beCloseTo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "EXPMatchers+beCloseTo.m"; sourceTree = "<group>"; };
  318 + 4B7116D915F8EE4600B64426 /* EXPMatchers+beFalsy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "EXPMatchers+beFalsy.h"; sourceTree = "<group>"; };
  319 + 4B7116DA15F8EE4600B64426 /* EXPMatchers+beFalsy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "EXPMatchers+beFalsy.m"; sourceTree = "<group>"; };
  320 + 4B7116DB15F8EE4600B64426 /* EXPMatchers+beGreaterThan.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "EXPMatchers+beGreaterThan.h"; sourceTree = "<group>"; };
  321 + 4B7116DC15F8EE4600B64426 /* EXPMatchers+beGreaterThan.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "EXPMatchers+beGreaterThan.m"; sourceTree = "<group>"; };
  322 + 4B7116DD15F8EE4600B64426 /* EXPMatchers+beGreaterThanOrEqualTo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "EXPMatchers+beGreaterThanOrEqualTo.h"; sourceTree = "<group>"; };
  323 + 4B7116DE15F8EE4600B64426 /* EXPMatchers+beGreaterThanOrEqualTo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "EXPMatchers+beGreaterThanOrEqualTo.m"; sourceTree = "<group>"; };
  324 + 4B7116DF15F8EE4600B64426 /* EXPMatchers+beIdenticalTo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "EXPMatchers+beIdenticalTo.h"; sourceTree = "<group>"; };
  325 + 4B7116E015F8EE4600B64426 /* EXPMatchers+beIdenticalTo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "EXPMatchers+beIdenticalTo.m"; sourceTree = "<group>"; };
  326 + 4B7116E115F8EE4600B64426 /* EXPMatchers+beInstanceOf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "EXPMatchers+beInstanceOf.h"; sourceTree = "<group>"; };
  327 + 4B7116E215F8EE4600B64426 /* EXPMatchers+beInstanceOf.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "EXPMatchers+beInstanceOf.m"; sourceTree = "<group>"; };
  328 + 4B7116E315F8EE4600B64426 /* EXPMatchers+beInTheRangeOf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "EXPMatchers+beInTheRangeOf.h"; sourceTree = "<group>"; };
  329 + 4B7116E415F8EE4600B64426 /* EXPMatchers+beInTheRangeOf.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "EXPMatchers+beInTheRangeOf.m"; sourceTree = "<group>"; };
  330 + 4B7116E515F8EE4600B64426 /* EXPMatchers+beKindOf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "EXPMatchers+beKindOf.h"; sourceTree = "<group>"; };
  331 + 4B7116E615F8EE4600B64426 /* EXPMatchers+beKindOf.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "EXPMatchers+beKindOf.m"; sourceTree = "<group>"; };
  332 + 4B7116E715F8EE4600B64426 /* EXPMatchers+beLessThan.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "EXPMatchers+beLessThan.h"; sourceTree = "<group>"; };
  333 + 4B7116E815F8EE4600B64426 /* EXPMatchers+beLessThan.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "EXPMatchers+beLessThan.m"; sourceTree = "<group>"; };
  334 + 4B7116E915F8EE4600B64426 /* EXPMatchers+beLessThanOrEqualTo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "EXPMatchers+beLessThanOrEqualTo.h"; sourceTree = "<group>"; };
  335 + 4B7116EA15F8EE4600B64426 /* EXPMatchers+beLessThanOrEqualTo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "EXPMatchers+beLessThanOrEqualTo.m"; sourceTree = "<group>"; };
  336 + 4B7116EB15F8EE4600B64426 /* EXPMatchers+beNil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "EXPMatchers+beNil.h"; sourceTree = "<group>"; };
  337 + 4B7116EC15F8EE4600B64426 /* EXPMatchers+beNil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "EXPMatchers+beNil.m"; sourceTree = "<group>"; };
  338 + 4B7116ED15F8EE4600B64426 /* EXPMatchers+beSubclassOf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "EXPMatchers+beSubclassOf.h"; sourceTree = "<group>"; };
  339 + 4B7116EE15F8EE4600B64426 /* EXPMatchers+beSubclassOf.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "EXPMatchers+beSubclassOf.m"; sourceTree = "<group>"; };
  340 + 4B7116EF15F8EE4600B64426 /* EXPMatchers+beTruthy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "EXPMatchers+beTruthy.h"; sourceTree = "<group>"; };
  341 + 4B7116F015F8EE4600B64426 /* EXPMatchers+beTruthy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "EXPMatchers+beTruthy.m"; sourceTree = "<group>"; };
  342 + 4B7116F115F8EE4600B64426 /* EXPMatchers+contain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "EXPMatchers+contain.h"; sourceTree = "<group>"; };
  343 + 4B7116F215F8EE4600B64426 /* EXPMatchers+contain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "EXPMatchers+contain.m"; sourceTree = "<group>"; };
  344 + 4B7116F315F8EE4600B64426 /* EXPMatchers+equal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "EXPMatchers+equal.h"; sourceTree = "<group>"; };
  345 + 4B7116F415F8EE4600B64426 /* EXPMatchers+equal.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "EXPMatchers+equal.m"; sourceTree = "<group>"; };
  346 + 4B7116F515F8EE4600B64426 /* EXPMatchers+haveCountOf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "EXPMatchers+haveCountOf.h"; sourceTree = "<group>"; };
  347 + 4B7116F615F8EE4600B64426 /* EXPMatchers+haveCountOf.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "EXPMatchers+haveCountOf.m"; sourceTree = "<group>"; };
  348 + 4B7116F715F8EE4600B64426 /* EXPMatchers+raise.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "EXPMatchers+raise.h"; sourceTree = "<group>"; };
  349 + 4B7116F815F8EE4600B64426 /* EXPMatchers+raise.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "EXPMatchers+raise.m"; sourceTree = "<group>"; };
  350 + 4B7116F915F8EE4600B64426 /* EXPMatchers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EXPMatchers.h; sourceTree = "<group>"; };
  351 + 4B7116FA15F8EE4600B64426 /* NSObject+Expecta.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+Expecta.h"; sourceTree = "<group>"; };
  352 + 4B7116FB15F8EE4600B64426 /* NSValue+Expecta.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSValue+Expecta.h"; sourceTree = "<group>"; };
  353 + 4B7116FC15F8EE4600B64426 /* NSValue+Expecta.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSValue+Expecta.m"; sourceTree = "<group>"; };
237 354 C70B6E6F13D0F62500709450 /* NSPersisentStoreHelperTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NSPersisentStoreHelperTests.h; path = "Unit Tests/NSPersisentStoreHelperTests.h"; sourceTree = "<group>"; };
238 355 C70B6E7013D0F62500709450 /* NSPersisentStoreHelperTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NSPersisentStoreHelperTests.m; path = "Unit Tests/NSPersisentStoreHelperTests.m"; sourceTree = "<group>"; };
239 356 C70B6E7213D0F64000709450 /* NSPersistentStoreCoordinatorHelperTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NSPersistentStoreCoordinatorHelperTests.h; path = "Unit Tests/NSPersistentStoreCoordinatorHelperTests.h"; sourceTree = "<group>"; };
@@ -431,6 +548,81 @@
431 548 /* End PBXFrameworksBuildPhase section */
432 549
433 550 /* Begin PBXGroup section */
  551 + 4B7116C015F8EE4600B64426 /* expecta */ = {
  552 + isa = PBXGroup;
  553 + children = (
  554 + 4B7116C115F8EE4600B64426 /* EXPBackwardCompatibility.h */,
  555 + 4B7116C215F8EE4600B64426 /* EXPBackwardCompatibility.m */,
  556 + 4B7116C315F8EE4600B64426 /* EXPBlockDefinedMatcher.h */,
  557 + 4B7116C415F8EE4600B64426 /* EXPBlockDefinedMatcher.m */,
  558 + 4B7116C515F8EE4600B64426 /* EXPDefines.h */,
  559 + 4B7116C615F8EE4600B64426 /* EXPDoubleTuple.h */,
  560 + 4B7116C715F8EE4600B64426 /* EXPDoubleTuple.m */,
  561 + 4B7116C815F8EE4600B64426 /* Expecta-Prefix.pch */,
  562 + 4B7116C915F8EE4600B64426 /* Expecta.h */,
  563 + 4B7116CA15F8EE4600B64426 /* Expecta.m */,
  564 + 4B7116CB15F8EE4600B64426 /* ExpectaSupport.h */,
  565 + 4B7116CC15F8EE4600B64426 /* ExpectaSupport.m */,
  566 + 4B7116CD15F8EE4600B64426 /* EXPExpect.h */,
  567 + 4B7116CE15F8EE4600B64426 /* EXPExpect.m */,
  568 + 4B7116CF15F8EE4600B64426 /* EXPFloatTuple.h */,
  569 + 4B7116D015F8EE4600B64426 /* EXPFloatTuple.m */,
  570 + 4B7116D115F8EE4600B64426 /* EXPMatcher.h */,
  571 + 4B7116D215F8EE4600B64426 /* EXPUnsupportedObject.h */,
  572 + 4B7116D315F8EE4600B64426 /* EXPUnsupportedObject.m */,
  573 + 4B7116D415F8EE4600B64426 /* matchers */,
  574 + 4B7116FA15F8EE4600B64426 /* NSObject+Expecta.h */,
  575 + 4B7116FB15F8EE4600B64426 /* NSValue+Expecta.h */,
  576 + 4B7116FC15F8EE4600B64426 /* NSValue+Expecta.m */,
  577 + );
  578 + name = expecta;
  579 + path = "Third Party/expecta";
  580 + sourceTree = "<group>";
  581 + };
  582 + 4B7116D415F8EE4600B64426 /* matchers */ = {
  583 + isa = PBXGroup;
  584 + children = (
  585 + 4B7116D515F8EE4600B64426 /* EXPMatcherHelpers.h */,
  586 + 4B7116D615F8EE4600B64426 /* EXPMatcherHelpers.m */,
  587 + 4B7116D715F8EE4600B64426 /* EXPMatchers+beCloseTo.h */,
  588 + 4B7116D815F8EE4600B64426 /* EXPMatchers+beCloseTo.m */,
  589 + 4B7116D915F8EE4600B64426 /* EXPMatchers+beFalsy.h */,
  590 + 4B7116DA15F8EE4600B64426 /* EXPMatchers+beFalsy.m */,
  591 + 4B7116DB15F8EE4600B64426 /* EXPMatchers+beGreaterThan.h */,
  592 + 4B7116DC15F8EE4600B64426 /* EXPMatchers+beGreaterThan.m */,
  593 + 4B7116DD15F8EE4600B64426 /* EXPMatchers+beGreaterThanOrEqualTo.h */,
  594 + 4B7116DE15F8EE4600B64426 /* EXPMatchers+beGreaterThanOrEqualTo.m */,
  595 + 4B7116DF15F8EE4600B64426 /* EXPMatchers+beIdenticalTo.h */,
  596 + 4B7116E015F8EE4600B64426 /* EXPMatchers+beIdenticalTo.m */,
  597 + 4B7116E115F8EE4600B64426 /* EXPMatchers+beInstanceOf.h */,
  598 + 4B7116E215F8EE4600B64426 /* EXPMatchers+beInstanceOf.m */,
  599 + 4B7116E315F8EE4600B64426 /* EXPMatchers+beInTheRangeOf.h */,
  600 + 4B7116E415F8EE4600B64426 /* EXPMatchers+beInTheRangeOf.m */,
  601 + 4B7116E515F8EE4600B64426 /* EXPMatchers+beKindOf.h */,
  602 + 4B7116E615F8EE4600B64426 /* EXPMatchers+beKindOf.m */,
  603 + 4B7116E715F8EE4600B64426 /* EXPMatchers+beLessThan.h */,
  604 + 4B7116E815F8EE4600B64426 /* EXPMatchers+beLessThan.m */,
  605 + 4B7116E915F8EE4600B64426 /* EXPMatchers+beLessThanOrEqualTo.h */,
  606 + 4B7116EA15F8EE4600B64426 /* EXPMatchers+beLessThanOrEqualTo.m */,
  607 + 4B7116EB15F8EE4600B64426 /* EXPMatchers+beNil.h */,
  608 + 4B7116EC15F8EE4600B64426 /* EXPMatchers+beNil.m */,
  609 + 4B7116ED15F8EE4600B64426 /* EXPMatchers+beSubclassOf.h */,
  610 + 4B7116EE15F8EE4600B64426 /* EXPMatchers+beSubclassOf.m */,
  611 + 4B7116EF15F8EE4600B64426 /* EXPMatchers+beTruthy.h */,
  612 + 4B7116F015F8EE4600B64426 /* EXPMatchers+beTruthy.m */,
  613 + 4B7116F115F8EE4600B64426 /* EXPMatchers+contain.h */,
  614 + 4B7116F215F8EE4600B64426 /* EXPMatchers+contain.m */,
  615 + 4B7116F315F8EE4600B64426 /* EXPMatchers+equal.h */,
  616 + 4B7116F415F8EE4600B64426 /* EXPMatchers+equal.m */,
  617 + 4B7116F515F8EE4600B64426 /* EXPMatchers+haveCountOf.h */,
  618 + 4B7116F615F8EE4600B64426 /* EXPMatchers+haveCountOf.m */,
  619 + 4B7116F715F8EE4600B64426 /* EXPMatchers+raise.h */,
  620 + 4B7116F815F8EE4600B64426 /* EXPMatchers+raise.m */,
  621 + 4B7116F915F8EE4600B64426 /* EXPMatchers.h */,
  622 + );
  623 + path = matchers;
  624 + sourceTree = "<group>";
  625 + };
434 626 C721C7A013D0A3750097AB6F = {
435 627 isa = PBXGroup;
436 628 children = (
@@ -685,6 +877,7 @@
685 877 C7C9A37013F43D3E002C5B0C /* Third Party */ = {
686 878 isa = PBXGroup;
687 879 children = (
  880 + 4B7116C015F8EE4600B64426 /* expecta */,
688 881 C7C9A37113F43D93002C5B0C /* JSONKit.h */,
689 882 C7C9A37213F43D93002C5B0C /* JSONKit.m */,
690 883 );
@@ -808,6 +1001,8 @@
808 1001 C70B6E7913D0F68400709450 /* NSManagedObjectContextHelperTests.m */,
809 1002 C70B6E7B13D0F69A00709450 /* NSManagedObjectHelperTests.h */,
810 1003 C70B6E7C13D0F69A00709450 /* NSManagedObjectHelperTests.m */,
  1004 + 4B7116BB15F8ED5A00B64426 /* SaveTests.h */,
  1005 + 4B7116BC15F8ED5A00B64426 /* SaveTests.m */,
811 1006 );
812 1007 name = "Core Tests";
813 1008 sourceTree = "<group>";
@@ -1042,6 +1237,34 @@
1042 1237 C7DD7303150F832B00216827 /* MagicalRecord+Setup.m in Sources */,
1043 1238 C7DD7305150F832B00216827 /* MagicalRecord+ShorthandSupport.m in Sources */,
1044 1239 C7DD7307150F832B00216827 /* MagicalRecord.m in Sources */,
  1240 + 4B7116FD15F8EE4600B64426 /* EXPBackwardCompatibility.m in Sources */,
  1241 + 4B7116FF15F8EE4600B64426 /* EXPBlockDefinedMatcher.m in Sources */,
  1242 + 4B71170115F8EE4600B64426 /* EXPDoubleTuple.m in Sources */,
  1243 + 4B71170315F8EE4600B64426 /* Expecta.m in Sources */,
  1244 + 4B71170515F8EE4600B64426 /* ExpectaSupport.m in Sources */,
  1245 + 4B71170715F8EE4600B64426 /* EXPExpect.m in Sources */,
  1246 + 4B71170915F8EE4600B64426 /* EXPFloatTuple.m in Sources */,
  1247 + 4B71170B15F8EE4600B64426 /* EXPUnsupportedObject.m in Sources */,
  1248 + 4B71170D15F8EE4600B64426 /* EXPMatcherHelpers.m in Sources */,
  1249 + 4B71170F15F8EE4600B64426 /* EXPMatchers+beCloseTo.m in Sources */,
  1250 + 4B71171115F8EE4600B64426 /* EXPMatchers+beFalsy.m in Sources */,
  1251 + 4B71171315F8EE4600B64426 /* EXPMatchers+beGreaterThan.m in Sources */,
  1252 + 4B71171515F8EE4600B64426 /* EXPMatchers+beGreaterThanOrEqualTo.m in Sources */,
  1253 + 4B71171715F8EE4600B64426 /* EXPMatchers+beIdenticalTo.m in Sources */,
  1254 + 4B71171915F8EE4600B64426 /* EXPMatchers+beInstanceOf.m in Sources */,
  1255 + 4B71171B15F8EE4600B64426 /* EXPMatchers+beInTheRangeOf.m in Sources */,
  1256 + 4B71171D15F8EE4600B64426 /* EXPMatchers+beKindOf.m in Sources */,
  1257 + 4B71171F15F8EE4600B64426 /* EXPMatchers+beLessThan.m in Sources */,
  1258 + 4B71172115F8EE4600B64426 /* EXPMatchers+beLessThanOrEqualTo.m in Sources */,
  1259 + 4B71172315F8EE4600B64426 /* EXPMatchers+beNil.m in Sources */,
  1260 + 4B71172515F8EE4600B64426 /* EXPMatchers+beSubclassOf.m in Sources */,
  1261 + 4B71172715F8EE4600B64426 /* EXPMatchers+beTruthy.m in Sources */,
  1262 + 4B71172915F8EE4600B64426 /* EXPMatchers+contain.m in Sources */,
  1263 + 4B71172B15F8EE4600B64426 /* EXPMatchers+equal.m in Sources */,
  1264 + 4B71172D15F8EE4600B64426 /* EXPMatchers+haveCountOf.m in Sources */,
  1265 + 4B71172F15F8EE4600B64426 /* EXPMatchers+raise.m in Sources */,
  1266 + 4B71173115F8EE4600B64426 /* NSValue+Expecta.m in Sources */,
  1267 + 4B71173415F914A400B64426 /* SaveTests.m in Sources */,
1045 1268 );
1046 1269 runOnlyForDeploymentPostprocessing = 0;
1047 1270 };
@@ -1116,6 +1339,34 @@
1116 1339 C7DD7304150F832B00216827 /* MagicalRecord+Setup.m in Sources */,
1117 1340 C7DD7306150F832B00216827 /* MagicalRecord+ShorthandSupport.m in Sources */,
1118 1341 C7DD7308150F832B00216827 /* MagicalRecord.m in Sources */,
  1342 + 4B7116FE15F8EE4600B64426 /* EXPBackwardCompatibility.m in Sources */,
  1343 + 4B71170015F8EE4600B64426 /* EXPBlockDefinedMatcher.m in Sources */,
  1344 + 4B71170215F8EE4600B64426 /* EXPDoubleTuple.m in Sources */,
  1345 + 4B71170415F8EE4600B64426 /* Expecta.m in Sources */,
  1346 + 4B71170615F8EE4600B64426 /* ExpectaSupport.m in Sources */,
  1347 + 4B71170815F8EE4600B64426 /* EXPExpect.m in Sources */,
  1348 + 4B71170A15F8EE4600B64426 /* EXPFloatTuple.m in Sources */,
  1349 + 4B71170C15F8EE4600B64426 /* EXPUnsupportedObject.m in Sources */,
  1350 + 4B71170E15F8EE4600B64426 /* EXPMatcherHelpers.m in Sources */,
  1351 + 4B71171015F8EE4600B64426 /* EXPMatchers+beCloseTo.m in Sources */,
  1352 + 4B71171215F8EE4600B64426 /* EXPMatchers+beFalsy.m in Sources */,
  1353 + 4B71171415F8EE4600B64426 /* EXPMatchers+beGreaterThan.m in Sources */,
  1354 + 4B71171615F8EE4600B64426 /* EXPMatchers+beGreaterThanOrEqualTo.m in Sources */,
  1355 + 4B71171815F8EE4600B64426 /* EXPMatchers+beIdenticalTo.m in Sources */,
  1356 + 4B71171A15F8EE4600B64426 /* EXPMatchers+beInstanceOf.m in Sources */,
  1357 + 4B71171C15F8EE4600B64426 /* EXPMatchers+beInTheRangeOf.m in Sources */,
  1358 + 4B71171E15F8EE4600B64426 /* EXPMatchers+beKindOf.m in Sources */,
  1359 + 4B71172015F8EE4600B64426 /* EXPMatchers+beLessThan.m in Sources */,
  1360 + 4B71172215F8EE4600B64426 /* EXPMatchers+beLessThanOrEqualTo.m in Sources */,
  1361 + 4B71172415F8EE4600B64426 /* EXPMatchers+beNil.m in Sources */,
  1362 + 4B71172615F8EE4600B64426 /* EXPMatchers+beSubclassOf.m in Sources */,
  1363 + 4B71172815F8EE4600B64426 /* EXPMatchers+beTruthy.m in Sources */,
  1364 + 4B71172A15F8EE4600B64426 /* EXPMatchers+contain.m in Sources */,
  1365 + 4B71172C15F8EE4600B64426 /* EXPMatchers+equal.m in Sources */,
  1366 + 4B71172E15F8EE4600B64426 /* EXPMatchers+haveCountOf.m in Sources */,
  1367 + 4B71173015F8EE4600B64426 /* EXPMatchers+raise.m in Sources */,
  1368 + 4B71173215F8EE4600B64426 /* NSValue+Expecta.m in Sources */,
  1369 + 4B71173315F9149900B64426 /* SaveTests.m in Sources */,
1119 1370 );
1120 1371 runOnlyForDeploymentPostprocessing = 0;
1121 1372 };
13 Project Files/Unit Tests/SaveTests.h
... ... @@ -0,0 +1,13 @@
  1 +//
  2 +// SaveTests.h
  3 +// Magical Record
  4 +//
  5 +// Created by Stephen J Vanterpool on 9/6/12.
  6 +// Copyright (c) 2012 Magical Panda Software LLC. All rights reserved.
  7 +//
  8 +
  9 +
  10 +
  11 +@interface SaveTests : GHTestCase
  12 +
  13 +@end
45 Project Files/Unit Tests/SaveTests.m
... ... @@ -0,0 +1,45 @@
  1 +//
  2 +// SaveTests.m
  3 +// Magical Record
  4 +//
  5 +// Created by Stephen J Vanterpool on 9/6/12.
  6 +// Copyright (c) 2012 Magical Panda Software LLC. All rights reserved.
  7 +//
  8 +
  9 +#define EXP_SHORTHAND
  10 +#import "Expecta.h"
  11 +#import "SaveTests.h"
  12 +#import "SingleEntityWithNoRelationships.h"
  13 +
  14 +@implementation SaveTests
  15 +- (void) setUpClass
  16 +{
  17 + [NSManagedObjectModel MR_setDefaultManagedObjectModel:[NSManagedObjectModel MR_managedObjectModelNamed:@"TestModel.momd"]];
  18 +
  19 +}
  20 +
  21 +- (void) setUp
  22 +{
  23 + NSLog(@"Creating stack");
  24 + [MagicalRecord setupCoreDataStackWithInMemoryStore];
  25 +}
  26 +
  27 +- (void) tearDown
  28 +{
  29 + [MagicalRecord cleanUp];
  30 +}
  31 +
  32 +
  33 +
  34 +- (void)testBackgroundSaveCallsCompletionHandler
  35 +{
  36 + __block BOOL didSave = NO;
  37 + [MagicalRecord saveInBackgroundWithBlock:^(NSManagedObjectContext *localContext) {
  38 + [SingleEntityWithNoRelationships MR_createInContext:localContext];
  39 + } completion:^{
  40 + didSave = YES;
  41 + }];
  42 +
  43 + expect(didSave).will.beTruthy();
  44 +}
  45 +@end

0 comments on commit 22311b7

Please sign in to comment.
Something went wrong with that request. Please try again.