Commit e2e08e2a authored by Samuel Giddins's avatar Samuel Giddins

[Installer] Fix specs for uniqing the list of vendored frameworks

parent b2816f10
...@@ -250,7 +250,10 @@ module Pod ...@@ -250,7 +250,10 @@ module Pod
describe '#verify_no_duplicate_framework_names' do describe '#verify_no_duplicate_framework_names' do
it 'detects duplicate framework names' do it 'detects duplicate framework names' do
Sandbox::FileAccessor.any_instance.stubs(:vendored_frameworks).returns([Pathname('monkey.framework')]) Sandbox::FileAccessor.any_instance.stubs(:vendored_frameworks).
returns([Pathname('a/monkey.framework')]).then.
returns([Pathname('b/monkey.framework')]).then.
returns([Pathname('c/monkey.framework')])
fixture_path = ROOT + 'spec/fixtures' fixture_path = ROOT + 'spec/fixtures'
config.repos_dir = fixture_path + 'spec-repos' config.repos_dir = fixture_path + 'spec-repos'
podfile = Pod::Podfile.new do podfile = Pod::Podfile.new do
...@@ -266,6 +269,25 @@ module Pod ...@@ -266,6 +269,25 @@ module Pod
@installer = Installer.new(config.sandbox, podfile, lockfile) @installer = Installer.new(config.sandbox, podfile, lockfile)
should.raise(Informative) { @installer.install! }.message.should.match /conflict.*monkey/ should.raise(Informative) { @installer.install! }.message.should.match /conflict.*monkey/
end end
it 'allows duplicate references to the same expanded framework path' do
Sandbox::FileAccessor.any_instance.stubs(:vendored_frameworks).returns([fixture('monkey/dynamic-monkey.framework')])
Sandbox::FileAccessor.any_instance.stubs(:dynamic_binary?).returns(true)
fixture_path = ROOT + 'spec/fixtures'
config.repos_dir = fixture_path + 'spec-repos'
podfile = Pod::Podfile.new do
platform :ios, '8.0'
xcodeproj 'SampleProject/SampleProject'
use_frameworks!
pod 'BananaLib', :path => (fixture_path + 'banana-lib').to_s
pod 'monkey', :path => (fixture_path + 'monkey').to_s
end
lockfile = generate_lockfile
config.integrate_targets = false
@installer = Installer.new(config.sandbox, podfile, lockfile)
should.not.raise(Informative) { @installer.install! }
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