Commit 9ca341d3 authored by Samuel Giddins's avatar Samuel Giddins

[TargetInspector] Add a spec for when the SDKROOT is not set

parent 2f2c146d
...@@ -270,6 +270,19 @@ module Pod ...@@ -270,6 +270,19 @@ module Pod
e = lambda { target_inspector.send(:compute_platform, user_targets) }.should.raise Informative e = lambda { target_inspector.send(:compute_platform, user_targets) }.should.raise Informative
e.message.should.match /Targets with different platforms/ e.message.should.match /Targets with different platforms/
end end
it 'raises if the platform cannot be inferred' do
user_project = Xcodeproj::Project.new('path')
target = user_project.new_target(:application, 'Target', :ios)
target.build_configuration_list.set_setting('SDKROOT', nil)
target_definition = Podfile::TargetDefinition.new(:default, nil)
user_targets = [target]
target_inspector = TargetInspector.new(target_definition, config.installation_root)
should.raise(Informative) { target_inspector.send(:compute_platform, user_targets) }.
message.should.include('Unable to determine the platform for the `default` target.')
end
end end
end end
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