Commit c426f623 authored by Boris Bügling's avatar Boris Bügling Committed by Marius Rackwitz

Do not add unbuild frameworks to the embed frameworks script.

parent 07711f7f
module Pod
class Installer
# Creates the targets which aggregate the Pods libraries in the Pods
......@@ -127,7 +128,7 @@ module Pod
frameworks_by_config = {}
target.user_build_configurations.keys.each do |config|
frameworks_by_config[config] = target.pod_targets.select do |pod_target|
pod_target.include_in_build_config?(config)
pod_target.include_in_build_config?(config) && pod_target.should_build?
end.map(&:product_name)
end
generator = Generator::EmbedFrameworksScript.new(target_definition, frameworks_by_config)
......
......@@ -150,6 +150,25 @@ module Pod
end
it 'does add pods to the embed frameworks script' do
@pod_target.stubs(:requires_frameworks? => true)
@target.stubs(:requires_frameworks? => true)
@installer.install!
support_files_dir = config.sandbox.target_support_files_dir('Pods')
script = support_files_dir + 'Pods-frameworks.sh'
script.read.should.include?('BananaLib.framework')
end
it 'does not add pods to the embed frameworks script if they are not to be build' do
@pod_target.stubs(:should_build? => false)
@pod_target.stubs(:requires_frameworks? => true)
@target.stubs(:requires_frameworks? => true)
@installer.install!
support_files_dir = config.sandbox.target_support_files_dir('Pods')
script = support_files_dir + 'Pods-frameworks.sh'
script.read.should.not.include?('BananaLib.framework')
end
it 'creates the acknowledgements files ' do
@installer.install!
support_files_dir = config.sandbox.target_support_files_dir('Pods')
......
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