Commit e58b364d authored by Fabio Pelosin's avatar Fabio Pelosin

[Specs] Detect the target with the matching name.

parent 48b7e5c5
......@@ -57,6 +57,19 @@ describe Pod::Installer::UserProjectIntegrator do
lambda { @target_integrator.user_project_path }.should.raise Pod::Informative
end
it "uses the target with the same name if the name is different from `:default'" do
target_integrator = @integrator.target_integrators[1]
target_integrator.target_definition.stubs(:name).returns('TestRunner')
target_integrator.target_definition.stubs(:link_with).returns(nil)
target_integrator.targets.first.name.should == 'TestRunner'
end
it "it raises if it can't find a target with the same name" do
target_integrator = @integrator.target_integrators[1]
target_integrator.target_definition.stubs(:link_with).returns(nil)
lambda { target_integrator.targets }.should.raise Pod::Informative
end
it "uses the first target in the user's project if no explicit target is specified" do
@target_integrator.target_definition.stubs(:link_with).returns(nil)
@target_integrator.targets.should == [Xcodeproj::Project.new(@sample_project_path).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