Commit a3bce83e authored by Luke Redpath's avatar Luke Redpath

Started to expand the specs for the Pods.xcodeproj generation extensions.

parent 907fdd1b
......@@ -11,6 +11,15 @@ module Xcodeproj
def add_pod_group(name)
pods.groups.new('name' => name)
end
# Shortcut access to build configurations
def build_configurations
objects[root_object.attributes['buildConfigurationList']].buildConfigurations
end
def build_configuration(name)
build_configurations.find { |c| c.name == name }
end
class PBXNativeTarget
def move_compile_phase_to_end!
......
......@@ -32,4 +32,23 @@ describe 'Xcodeproj::Project' do
}).should.not == nil
@project.targets.first.buildPhases.should.include phase
end
shared "for any platform" do
it "adds a Debug and Release build configuration" do
@project.build_configurations.count.should == 2
@project.build_configurations.map(&:name).sort.should == %w{Debug Release}.sort
end
end
describe "for the :ios platform" do
before do
@project = Xcodeproj::Project.for_platform(:ios)
end
behaves_like "for any platform"
it "sets VALIDATE_PRODUCT to YES for the Release configuration" do
@project.build_configuration("Release").buildSettings["VALIDATE_PRODUCT"].should == "YES"
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