Skip to content

Commit

Permalink
Fix test breakage from changes around shared factory objects
Browse files Browse the repository at this point in the history
  • Loading branch information
blakewatters committed Sep 29, 2012
1 parent 1c6564f commit 03439f2
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
6 changes: 6 additions & 0 deletions RestKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,8 @@
254372D715F54CE3006E8424 /* RKManagedObjectRequestOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 254372D415F54CE3006E8424 /* RKManagedObjectRequestOperation.h */; };
254372D815F54CE3006E8424 /* RKManagedObjectRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 254372D515F54CE3006E8424 /* RKManagedObjectRequestOperation.m */; };
254372D915F54CE3006E8424 /* RKManagedObjectRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 254372D515F54CE3006E8424 /* RKManagedObjectRequestOperation.m */; };
2564E40B16173F7B00C12D7D /* RKRelationshipConnectionOperationTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2564E40A16173F7B00C12D7D /* RKRelationshipConnectionOperationTest.m */; };
2564E40C16173F7B00C12D7D /* RKRelationshipConnectionOperationTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2564E40A16173F7B00C12D7D /* RKRelationshipConnectionOperationTest.m */; };
257ABAB015112DD500CCAA76 /* NSManagedObjectContext+RKAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 257ABAAE15112DD400CCAA76 /* NSManagedObjectContext+RKAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
257ABAB115112DD500CCAA76 /* NSManagedObjectContext+RKAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 257ABAAE15112DD400CCAA76 /* NSManagedObjectContext+RKAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
257ABAB215112DD500CCAA76 /* NSManagedObjectContext+RKAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 257ABAAF15112DD400CCAA76 /* NSManagedObjectContext+RKAdditions.m */; };
Expand Down Expand Up @@ -854,6 +856,7 @@
254372D415F54CE3006E8424 /* RKManagedObjectRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RKManagedObjectRequestOperation.h; sourceTree = "<group>"; };
254372D515F54CE3006E8424 /* RKManagedObjectRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKManagedObjectRequestOperation.m; sourceTree = "<group>"; };
254A62BF14AD591C00939BEE /* RKObjectPaginatorTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKObjectPaginatorTest.m; sourceTree = "<group>"; };
2564E40A16173F7B00C12D7D /* RKRelationshipConnectionOperationTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKRelationshipConnectionOperationTest.m; sourceTree = "<group>"; };
257ABAAE15112DD400CCAA76 /* NSManagedObjectContext+RKAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSManagedObjectContext+RKAdditions.h"; sourceTree = "<group>"; };
257ABAAF15112DD400CCAA76 /* NSManagedObjectContext+RKAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSManagedObjectContext+RKAdditions.m"; sourceTree = "<group>"; };
257ABAB41511371C00CCAA76 /* NSManagedObject+RKAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSManagedObject+RKAdditions.h"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1387,6 +1390,7 @@
259D986315521B1F008C90F5 /* RKEntityCacheTest.m */,
25AA23D315AF4F25006EF62D /* RKManagedObjectMappingOperationDataSourceTest.m */,
258EFF7915C0CE1400EE4E0D /* RKManagedObjectSeederTest.m */,
2564E40A16173F7B00C12D7D /* RKRelationshipConnectionOperationTest.m */,
);
name = CoreData;
path = Logic/CoreData;
Expand Down Expand Up @@ -2506,6 +2510,7 @@
5C927E141608FFFD00DC8B07 /* RKDictionaryUtilitiesTest.m in Sources */,
25E9C8F01612523400647F84 /* RKObjectParameterizationTest.m in Sources */,
25EDFCE3161538F6008BAA1D /* RKObjectManagerTest.m in Sources */,
2564E40B16173F7B00C12D7D /* RKRelationshipConnectionOperationTest.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -2666,6 +2671,7 @@
25C246A515C83B090032212E /* RKSearchTest.m in Sources */,
5C927E151608FFFD00DC8B07 /* RKDictionaryUtilitiesTest.m in Sources */,
25EDFCE5161538F8008BAA1D /* RKObjectManagerTest.m in Sources */,
2564E40C16173F7B00C12D7D /* RKRelationshipConnectionOperationTest.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
10 changes: 10 additions & 0 deletions Tests/Logic/CoreData/NSEntityDescription+RKAdditionsTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ @interface NSEntityDescription_RKAdditionsTest : RKTestCase

@implementation NSEntityDescription_RKAdditionsTest

- (void)setUp
{
[RKTestFactory setUp];
}

- (void)tearDown
{
[RKTestFactory tearDown];
}

- (void)testRetrievalOfPrimaryKeyFromXcdatamodel
{
RKManagedObjectStore *managedObjectStore = [RKTestFactory managedObjectStore];
Expand Down
12 changes: 11 additions & 1 deletion Tests/Logic/CoreData/NSManagedObjectContext+RKAdditionsTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ @interface NSManagedObjectContext_RKAdditionsTest : SenTestCase

@implementation NSManagedObjectContext_RKAdditionsTest

- (void)setUp
{
[RKTestFactory setUp];
}

- (void)tearDown
{
[RKTestFactory tearDown];
}

- (void)testFetchObjectForEntityWithValueForPrimaryKeyAttribute
{
RKManagedObjectStore *managedObjectStore = [RKTestFactory managedObjectStore];
Expand Down Expand Up @@ -51,7 +61,7 @@ - (void)testFetchObjectForEntityForNameWithValueForPrimaryKeyAttribute
assertThatInteger(count, is(equalToInteger(1)));

RKHuman *foundHuman = [managedObjectStore.primaryManagedObjectContext fetchObjectForEntityForName:@"RKHuman" withValueForPrimaryKeyAttribute:[NSNumber numberWithInt:12345]];
assertThat(foundHuman, is(nilValue()));
assertThat(foundHuman, is(notNilValue()));

foundHuman = [context fetchObjectForEntityForName:@"RKHuman" withValueForPrimaryKeyAttribute:[NSNumber numberWithInt:12345]];
assertThat(foundHuman, is(equalTo(human)));
Expand Down

0 comments on commit 03439f2

Please sign in to comment.