Commit de7d95d8 authored by Samuel Giddins's avatar Samuel Giddins

[PodTargetInstaller] Add spec for using the pods own deployment target

parent d9b30f5d
...@@ -318,7 +318,7 @@ module Pod ...@@ -318,7 +318,7 @@ module Pod
def deployment_target def deployment_target
default = Podfile::TargetDefinition::PLATFORM_DEFAULTS[target.platform.name] default = Podfile::TargetDefinition::PLATFORM_DEFAULTS[target.platform.name]
target.specs.map do |spec| target.specs.map do |spec|
Pod::Version.new(spec.deployment_target(target.platform) || default) Pod::Version.new(spec.deployment_target(target.platform.name) || default)
end.max.to_s end.max.to_s
end end
......
...@@ -33,6 +33,14 @@ module Pod ...@@ -33,6 +33,14 @@ module Pod
@spec.prefix_header_contents = '#import "BlocksKit.h"' @spec.prefix_header_contents = '#import "BlocksKit.h"'
end end
it 'uses the maximum of all spec deployment targets' do
spec_1 = Pod::Specification.new { |s| s.ios.deployment_target = '10.10' }
spec_2 = Pod::Specification.new { |s| s.ios.deployment_target = '10.9' }
spec_3 = Pod::Specification.new
@pod_target.stubs(:specs).returns([spec_1, spec_2, spec_3])
@installer.send(:deployment_target).should == '10.10'
end
it 'sets the platform and the deployment target for iOS targets' do it 'sets the platform and the deployment target for iOS targets' do
@installer.install! @installer.install!
target = @project.targets.first target = @project.targets.first
......
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