Commit d905c985 authored by Nolan Waite's avatar Nolan Waite

More tests for project config

parent 218f502d
......@@ -148,7 +148,9 @@ module Pod
class PBXSourcesBuildPhase < PBXBuildPhase; end
class PBXCopyFilesBuildPhase < PBXBuildPhase; end
class PBXFrameworksBuildPhase < PBXBuildPhase; end
class PBXShellScriptBuildPhase < PBXBuildPhase; end
class PBXShellScriptBuildPhase < PBXBuildPhase
attributes_accessor :shellScript
end
class PBXNativeTarget < PBXObject
attributes_accessor :buildPhases, :buildConfigurationList
......
......@@ -146,6 +146,23 @@ else
xcworkspace = temporary_directory + 'ASIHTTPRequest.xcworkspace'
workspace = Pod::Xcode::Workspace.new_from_xcworkspace(xcworkspace)
workspace.projpaths.sort.should == ['ASIHTTPRequest.xcodeproj', 'Pods/Pods.xcodeproj']
project = Pod::Xcode::Project.new(projpath)
config = project.files.find { |f| f.path =~ /Pods.xcconfig$/ }
config.should.not.equal nil
copy_resources = project.objects.select_by_class(Pod::Xcode::Project::PBXShellScriptBuildPhase).find do |ss|
ss.shellScript['PodsResources.sh']
end
copy_resources.should.not.equal nil
project.targets.each do |target|
bases = target.buildConfigurationList.buildConfigurations.map(&:baseConfigurationReference)
bases.uniq[0].uuid.should == config.uuid
target.buildPhases.map(&:uuid).should.include copy_resources.uuid
end
lib = project.files.find { |f| f.path =~ /libPods.a$/ }
lib.should.not.equal nil
project.objects.select_by_class(Pod::Xcode::Project::PBXFrameworksBuildPhase).each do |build_phase|
build_phase.files.map(&:uuid).should.include lib.build_file.uuid
end
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