Skip to content

Commit

Permalink
Adds failing test for CocoaPods#5514
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisortman committed Oct 20, 2016
1 parent 60dd8e2 commit 8f4e140
Showing 1 changed file with 31 additions and 3 deletions.
34 changes: 31 additions & 3 deletions spec/unit/generator/xcconfig/aggregate_xcconfig_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ def pod_target(spec, target_definition)
before do
@target_definition = fixture_target_definition
@specs = specs
@specs.first.user_target_xcconfig = { 'OTHER_LDFLAGS' => '-no_compact_unwind' }
@specs.first.pod_target_xcconfig = { 'CLANG_CXX_LANGUAGE_STANDARD' => 'c++11' }
@specs.first.user_target_xcconfig = { 'OTHER_LDFLAGS' => '-no_compact_unwind' } unless @specs.empty?
@specs.first.pod_target_xcconfig = { 'CLANG_CXX_LANGUAGE_STANDARD' => 'c++11' } unless @specs.empty?
@pod_targets = @specs.map { |spec| pod_target(spec, @target_definition) }
@target = fixture_aggregate_target(@pod_targets, @target_definition)
@target.target_definition.whitelist_pod_for_configuration(@specs.first.name, 'Release')
unless @specs.empty?
@target.target_definition.whitelist_pod_for_configuration(@specs.first.name, 'Release')
end
@generator = AggregateXCConfig.new(@target, 'Release')
end

Expand Down Expand Up @@ -130,6 +132,7 @@ def pod_target(spec, target_definition)
it 'links the pod targets with the aggregate target' do
@xcconfig.to_hash['OTHER_LDFLAGS'].should.include '-l"BananaLib-Pods"'
end

end

describe 'with an unscoped pod target' do
Expand Down Expand Up @@ -398,6 +401,31 @@ def specs
end
end
end

describe 'an empty pod target' do

before do
@blank_target = fixture_aggregate_target
@generator = AggregateXCConfig.new(@blank_target, 'Release')
end

it 'it should not have any framework search paths' do
@xcconfig = @generator.generate
@xcconfig.to_hash['FRAMEWORK_SEARCH_PATHS'].should.be.nil
end

describe 'with inherited targets' do

it 'should include inherited search paths' do
# It's the responsibility of the analyzer to
# populate this when the file is loaded.
@blank_target.search_paths_aggregate_targets = [@target]
@xcconfig = @generator.generate
@xcconfig.to_hash['FRAMEWORK_SEARCH_PATHS'].should.not.be.nil

end
end
end
end
end
end
Expand Down

0 comments on commit 8f4e140

Please sign in to comment.