diff --git a/EasyMapping.podspec b/EasyMapping.podspec index ab194b3..a78f9a3 100644 --- a/EasyMapping.podspec +++ b/EasyMapping.podspec @@ -15,12 +15,17 @@ Pod::Spec.new do |s| s.ios.deployment_target = '5.0' s.osx.deployment_target = '10.7' - s.frameworks = 'CoreData' - s.source_files = 'EasyMapping/*.{h,m}' + s.subspec 'Core' do |core| + core.frameworks = 'CoreData' + core.source_files = 'EasyMapping/*.{h,m}' + end s.subspec 'XCTest' do |xctest| + xctest.dependency 'EasyMapping/Core' xctest.frameworks = 'XCTest' xctest.source_files = 'XCTest+EasyMapping/*.{h,m}' end + + s.default_subspec = 'Core' end diff --git a/XCTest+EasyMapping/XCTestCase+EasyMapping.m b/XCTest+EasyMapping/XCTestCase+EasyMapping.m index 3a72ecb..cf14a99 100644 --- a/XCTest+EasyMapping/XCTestCase+EasyMapping.m +++ b/XCTest+EasyMapping/XCTestCase+EasyMapping.m @@ -64,7 +64,7 @@ - (void)testMappedObject:(id)mappedObject withMapping:(EKObjectMapping *)mapping NSArray *relationshipKeyPathsToSkip = [self extractRelationshipKeyPathsFromKeyPaths:keyPathsToSkip forRelationship:keyPath]; [relationshipObjects enumerateObjectsUsingBlock:^(id relationshipObject, NSUInteger idx, BOOL *stop) { id expectedRelationshipObject = expectedRelationshipObjects[idx]; - NSString *indexKeyPath = [NSString stringWithFormat:@"%@[%lu]", keyPath, idx]; + NSString *indexKeyPath = [NSString stringWithFormat:@"%@[%@]", keyPath, @(idx)]; NSString *relationshipRootKeyPath = [self keyPathByAppendingKeyPath:indexKeyPath toRootKeyPath:rootKeyPath]; [self testMappedObject:relationshipObject withMapping:hasManyMapping.objectMapping expectedObject:expectedRelationshipObject skippingKeyPaths:relationshipKeyPathsToSkip rootKeyPath:relationshipRootKeyPath]; @@ -125,7 +125,7 @@ - (void)testSerializedObject:(NSDictionary *)serializedObject withMapping:(EKObj NSArray *relationshipKeyPathsToSkip = [self extractRelationshipKeyPathsFromKeyPaths:keyPathsToSkip forRelationship:keyPath]; [relationshipRepresentations enumerateObjectsUsingBlock:^(id relationshipRepresentation, NSUInteger idx, BOOL *stop) { id expectedRelationshipRepresentation = expectedRelationshipRepresentations[idx]; - NSString *indexKeyPath = [NSString stringWithFormat:@"%@[%lu]", keyPath, idx]; + NSString *indexKeyPath = [NSString stringWithFormat:@"%@[%@]", keyPath, @(idx)]; NSString *relationshipRootKeyPath = [self keyPathByAppendingKeyPath:indexKeyPath toRootKeyPath:rootKeyPath]; [self testSerializedObject:relationshipRepresentation withMapping:hasManyMapping.objectMapping expectedRepresentation:expectedRelationshipRepresentation skippingKeyPaths:relationshipKeyPathsToSkip rootKeyPath:relationshipRootKeyPath];