Commit 68d5cbd1 authored by Fabio Pelosin's avatar Fabio Pelosin

[Specs] Robustness of specs related to target_integrator.

parent 76fcc490
......@@ -65,13 +65,14 @@ describe Pod::Installer::UserProjectIntegrator do
end
it "it raises if it can't find a target with the same name" do
target_integrator = @integrator.target_integrators[1]
target_integrator = @integrator.target_integrators.find { |ti| ti.target_definition.name == :test_runner }
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]
target_integrator = @integrator.target_integrators.find { |ti| ti.target_definition.name == :default }
target_integrator.target_definition.stubs(:link_with).returns(nil)
target_integrator.targets.should == [Xcodeproj::Project.new(@sample_project_path).targets.first]
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