Commit 739c42df authored by Per Eckerdal's avatar Per Eckerdal

Test that we do not add linked projects twice

parent 1ab7a6ff
...@@ -57,7 +57,6 @@ module Pod ...@@ -57,7 +57,6 @@ module Pod
@pod_target.target.frameworks_build_phase.files_references.map(&:path).should.include('libSample Lib.a') @pod_target.target.frameworks_build_phase.files_references.map(&:path).should.include('libSample Lib.a')
end end
it "adds linked projects" do it "adds linked projects" do
path = SpecHelper::Fixture.fixture('SampleProject/Sample Lib/Sample Lib.xcodeproj') path = SpecHelper::Fixture.fixture('SampleProject/Sample Lib/Sample Lib.xcodeproj')
@installer.stubs(:linked_project_specs).returns({ @installer.stubs(:linked_project_specs).returns({
...@@ -68,6 +67,19 @@ module Pod ...@@ -68,6 +67,19 @@ module Pod
@project.reference_for_path(path).isa.should.be == 'PBXFileReference' @project.reference_for_path(path).isa.should.be == 'PBXFileReference'
end end
it "does not add linked projects twice" do
path = SpecHelper::Fixture.fixture('SampleProject/Sample Lib/Sample Lib.xcodeproj')
@installer.stubs(:linked_project_specs).returns({
path => [@file_accessor.spec]
})
@installer.send(:add_linked_projects)
@installer.send(:add_linked_projects)
@project.objects.find_all do |child|
child.isa == 'PBXFileReference' && child.real_path == path
end.length.should.be == 1
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