Commit 0f765dcb authored by Samuel E. Giddins's avatar Samuel E. Giddins

Update XCConfig specs for partial removal of the -ObjC ld flag

parent cfce5e9e
......@@ -38,7 +38,7 @@ module Pod
target.spec_consumers.any?(&:requires_arc?)
ld_flags << ' -fobjc-arc'
end
ld_flags
ld_flags.strip
end
# Configures the given Xcconfig
......
Subproject commit 6d4b38764f551fcda4da634ba777640d96162b56
Subproject commit 99cf7a48d31f8d48aff0266d46ae950b4c28d804
......@@ -38,10 +38,6 @@ module Pod
@xcconfig.class.should == Xcodeproj::Config
end
it 'configures the project to load all members that implement Objective-c classes or categories' do
@xcconfig.to_hash['OTHER_LDFLAGS'].should.include '-ObjC'
end
it 'does not add the -fobjc-arc to OTHER_LDFLAGS by default as Xcode 4.3.2 does not support it' do
@consumer.stubs(:requires_arc?).returns(true)
@xcconfig.to_hash['OTHER_LDFLAGS'].should.not.include('-fobjc-arc')
......@@ -97,6 +93,10 @@ module Pod
behaves_like 'AggregateXCConfig'
it 'configures the project to load all members that implement Objective-c classes or categories' do
@xcconfig.to_hash['OTHER_LDFLAGS'].should.include '-ObjC'
end
it 'adds the sandbox public headers search paths to the xcconfig, with quotes, as header search paths' do
expected = "$(inherited) \"#{config.sandbox.public_headers.search_paths(:ios).join('" "')}\""
@xcconfig.to_hash['HEADER_SEARCH_PATHS'].should == expected
......@@ -141,6 +141,10 @@ module Pod
behaves_like 'AggregateXCConfig'
it "doesn't configure the project to load all members that implement Objective-c classes or categories" do
@xcconfig.to_hash['OTHER_LDFLAGS'].should.not.include '-ObjC'
end
describe 'with a vendored-library pod' do
def spec
fixture_spec('monkey/monkey.podspec')
......@@ -149,6 +153,10 @@ module Pod
it 'does not add the framework build path to the xcconfig' do
@xcconfig.to_hash['FRAMEWORK_SEARCH_PATHS'].should.be.nil?
end
it 'configures the project to load all members that implement Objective-c classes or categories' do
@xcconfig.to_hash['OTHER_LDFLAGS'].should.include '-ObjC'
end
end
it 'sets the PODS_FRAMEWORK_BUILD_PATH build variable' do
......
......@@ -19,8 +19,8 @@ module Pod
@xcconfig.class.should == Xcodeproj::Config
end
it 'configures the project to load all members that implement Objective-c classes or categories from the static library' do
@xcconfig.to_hash['OTHER_LDFLAGS'].should.include '-ObjC'
it 'does not configure the project to load all members that implement Objective-c classes or categories from the static library' do
@xcconfig.to_hash['OTHER_LDFLAGS'].should.not.include '-ObjC'
end
it 'does not add the -fobjc-arc to OTHER_LDFLAGS by default as Xcode 4.3.2 does not support it' do
......
......@@ -15,6 +15,9 @@ module Pod
podfile = stub(:set_arc_compatibility_flag? => false)
target = stub(:podfile => podfile)
result = @sut.default_ld_flags(target)
result.should == ''
result = @sut.default_ld_flags(target, true)
result.should == '-ObjC'
end
......@@ -23,6 +26,9 @@ module Pod
spec_consumer = stub(:requires_arc? => true)
target = stub(:podfile => podfile, :spec_consumers => [spec_consumer])
result = @sut.default_ld_flags(target)
result.should == '-fobjc-arc'
result = @sut.default_ld_flags(target, true)
result.should == '-ObjC -fobjc-arc'
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment