Commit 61969210 authored by Samuel Ford's avatar Samuel Ford

working spec for abs root

parent 9b03b45b
...@@ -297,7 +297,7 @@ module Pod ...@@ -297,7 +297,7 @@ module Pod
pod_names.each do |pod_name| pod_names.each do |pod_name|
local = sandbox.local?(pod_name) local = sandbox.local?(pod_name)
path = sandbox.pod_dir(pod_name) path = sandbox.pod_dir(pod_name)
@pods_project.add_pod_group(pod_name, path, local, local ) @pods_project.add_pod_group(pod_name, path, local, local)
end end
if config.podfile_path if config.podfile_path
......
...@@ -21,6 +21,16 @@ def generate_podfile(pods = ['JSONKit']) ...@@ -21,6 +21,16 @@ def generate_podfile(pods = ['JSONKit'])
end end
end end
# @return [Podfile]
#
def generate_local_podfile
podfile = Pod::Podfile.new do
platform :ios
xcodeproj SpecHelper.fixture('SampleProject/SampleProject'), 'Test' => :debug, 'App Store' => :release
pod 'SSToolkit', :path => SpecHelper.fixture('integration/sstoolkit')
end
end
#-----------------------------------------------------------------------------# #-----------------------------------------------------------------------------#
module Pod module Pod
...@@ -247,10 +257,13 @@ module Pod ...@@ -247,10 +257,13 @@ module Pod
@installer.pods_project.class.should == Pod::Project @installer.pods_project.class.should == Pod::Project
end end
it "set the path of the Pod group to an absolute path if local" do it "sets the path of the Pod group to an absolute path if local" do
podfile_path = Pathname.new('/Podfile') local_podfile = generate_local_podfile
config.stubs(:podfile_path).returns(podfile_path) local_installer = Installer.new(config.sandbox, local_podfile)
@installer.send(:prepare_pods_project) local_installer.send(:analyze)
local_installer.send(:prepare_pods_project)
group = local_installer.pods_project.group_for_spec('SSToolkit')
Pathname.new(group.path).should.be.absolute
end end
it "adds the Podfile to the Pods project" do it "adds the Podfile to the Pods project" do
......
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