Commit 9d388306 authored by Ian Ynda-Hummel's avatar Ian Ynda-Hummel

Touch up some things to conform to best practices.

* Added some documentation for a couple private methods as suggested.
* Modified to the spec to explicitly include generating target modules.
* Use config.podfile.
parent d382eb07
......@@ -50,7 +50,7 @@ module Pod
# platform :ios, "6.0"
PLATFORM
for target in project.targets
podfile << target_module(target, !has_global_platform)
podfile << target_module(target)
end
podfile
end
......
......@@ -61,5 +61,25 @@ module Pod
Dir.chdir(pwd)
end
it "creates a Podfile with targets from the project" do
pwd = Dir.pwd
Dir.chdir(temporary_directory)
project = Xcodeproj::Project.new
target1 = project.new_target(:application, "AppA", :ios)
target2 = project.new_target(:application, "AppB", :ios)
project.save_as(temporary_directory + 'test.xcodeproj')
run_command('init')
config.podfile.nil?.should == false
puts config.podfile.target_definitions
config.podfile.target_definitions.length.should == project.targets.length + 1
config.podfile.target_definitions["AppA"].nil?.should == false
config.podfile.target_definitions["AppB"].nil?.should == false
Dir.chdir(pwd)
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