Skip to content

Commit

Permalink
add subspecs. Fix 32-bit warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
DenTelezhkin committed Jan 18, 2015
1 parent a06d63a commit a17f7b8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 7 additions & 2 deletions EasyMapping.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions XCTest+EasyMapping/XCTestCase+EasyMapping.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit a17f7b8

Please sign in to comment.