Commit 5690b44c authored by Fabio Pelosin's avatar Fabio Pelosin

[Issue#376] Added specs that evidence architectural issues.

parent 8a61d2db
Subproject commit c8a3e521ee57ce2e6fa73c55a3e2f0042cc2033a
Subproject commit 6116b0a386a0313d7183ea219be1b51d56962546
......@@ -33,6 +33,55 @@ module Pod
end
end
describe "concerning multiple pods originating form the same spec" do
extend SpecHelper::Fixture
before do
sandbox = temporary_sandbox
Pod::Config.instance.project_pods_root = sandbox.root
Pod::Config.instance.integrate_targets = false
podspec_path = fixture('integration/Reachability/Reachability.podspec')
podfile = Podfile.new do
platform :osx
pod 'Reachability', :podspec => podspec_path.to_s
target :debug do
pod 'Reachability'
end
end
resolver = Resolver.new(podfile, nil, sandbox)
@installer = Installer.new(resolver)
end
# The double installation leads to a bug when different subspecs are
# activated for the same pod. We need a way to install a pod only
# once while keeping all the files of the actived subspecs.
#
# LocalPodSet?
#
it "installs the pods only once" do
LocalPod.any_instance.stubs(:downloaded?).returns(false)
Downloader::GitHub.any_instance.expects(:download).once
@installer.install!
end
it "cleans a pod only once" do
LocalPod.any_instance.expects(:clean!).once
@installer.install!
end
it "adds the files of the pod to the Pods project only once" do
@installer.install!
group = @installer.project.pods.groups.find{|g| g.name == 'Reachability'}
group.files.map(&:name).should == ["Reachability.h", "Reachability.m"]
end
it "it list a pod only once" do
reachability_pods = @installer.pods.map(&:to_s).select{|s| s.include?('Reachability')}
reachability_pods.count.should == 1
end
end
it "generates a BridgeSupport metadata file from all the pod headers" do
podfile = Podfile.new do
platform :osx
......
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