Skip to content

Commit e7cad14

Browse files
committed
test for external source reuse
1 parent f4abb42 commit e7cad14

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

spec/podfile/dsl_spec.rb

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,24 @@ module Pod
411411
target.dependencies.sort_by(&:name).should == expected_dependencies
412412
end
413413

414+
it 'implicitly reuses an external source' do
415+
podfile = Podfile.new do
416+
target 'A' do
417+
pod 'RestKit', :git => 'https://github.com/RestKit/RestKit.git'
418+
end
419+
420+
target 'B' do
421+
pod 'RestKit'
422+
end
423+
end
424+
425+
expected_dependencies = [
426+
Dependency.new('RestKit', :git => 'https://github.com/RestKit/RestKit.git'),
427+
]
428+
podfile.target_definitions['A'].dependencies.sort_by(&:name).should == expected_dependencies
429+
podfile.target_definitions['B'].dependencies.sort_by(&:name).should == expected_dependencies
430+
end
431+
414432
it 'raises if no name is specified for a Pod' do
415433
lambda do
416434
Podfile.new do

0 commit comments

Comments
 (0)