Commit 89265242 authored by Eloy Duran's avatar Eloy Duran

Small cleanup and use xit for a few more specs instead of commenting.

parent cb05af48
......@@ -43,19 +43,5 @@ module Pod
target
end
private
# TODO this needs to be added to each individual target
def self.build_settings(platform)
settings = {}
if platform.requires_legacy_ios_archs?
settings['ARCHS'] = "armv6 armv7"
end
if platform == :ios && platform.deployment_target
settings['IPHONEOS_DEPLOYMENT_TARGET'] = platform.deployment_target.to_s
end
settings
end
end
end
......@@ -80,9 +80,7 @@ describe Pod::LocalPod do
end
end
# TODO: This is really what a LocalPod now represents
# Which probably means most of this functionality should move there
#describe "A Pod::Specification, with installed source," do
describe "A Pod::LocalPod, with installed source," do
#before do
#config.project_pods_root = fixture('integration')
#podspec = fixture('spec-repos/master/SSZipArchive/0.1.0/SSZipArchive.podspec')
......@@ -94,85 +92,85 @@ end
#config.project_pods_root = nil
#end
#it "returns the list of files that the source_files pattern expand to" do
#files = @destroot.glob('**/*.{h,c,m}')
#files = files.map { |file| file.relative_path_from(config.project_pods_root) }
#@spec.expanded_source_files[:ios].sort.should == files.sort
#end
xit "returns the list of files that the source_files pattern expand to" do
files = @destroot.glob('**/*.{h,c,m}')
files = files.map { |file| file.relative_path_from(config.project_pods_root) }
@spec.expanded_source_files[:ios].sort.should == files.sort
end
#it "returns the list of headers" do
#files = @destroot.glob('**/*.h')
#files = files.map { |file| file.relative_path_from(config.project_pods_root) }
#@spec.header_files[:ios].sort.should == files.sort
#end
xit "returns the list of headers" do
files = @destroot.glob('**/*.h')
files = files.map { |file| file.relative_path_from(config.project_pods_root) }
@spec.header_files[:ios].sort.should == files.sort
end
#it "returns a hash of mappings from the pod's destroot to its header dirs, which by default is just the pod's header dir" do
#@spec.copy_header_mappings[:ios].size.should == 1
#@spec.copy_header_mappings[:ios][Pathname.new('SSZipArchive')].sort.should == %w{
#SSZipArchive.h
#minizip/crypt.h
#minizip/ioapi.h
#minizip/mztools.h
#minizip/unzip.h
#minizip/zip.h
#}.map { |f| Pathname.new("SSZipArchive/#{f}") }.sort
#end
xit "returns a hash of mappings from the pod's destroot to its header dirs, which by default is just the pod's header dir" do
@spec.copy_header_mappings[:ios].size.should == 1
@spec.copy_header_mappings[:ios][Pathname.new('SSZipArchive')].sort.should == %w{
SSZipArchive.h
minizip/crypt.h
minizip/ioapi.h
minizip/mztools.h
minizip/unzip.h
minizip/zip.h
}.map { |f| Pathname.new("SSZipArchive/#{f}") }.sort
end
#it "allows for customization of header mappings by overriding copy_header_mapping" do
#def @spec.copy_header_mapping(from)
#Pathname.new('ns') + from.basename
#end
#@spec.copy_header_mappings[:ios].size.should == 1
#@spec.copy_header_mappings[:ios][Pathname.new('SSZipArchive/ns')].sort.should == %w{
#SSZipArchive.h
#minizip/crypt.h
#minizip/ioapi.h
#minizip/mztools.h
#minizip/unzip.h
#minizip/zip.h
#}.map { |f| Pathname.new("SSZipArchive/#{f}") }.sort
#end
xit "allows for customization of header mappings by overriding copy_header_mapping" do
def @spec.copy_header_mapping(from)
Pathname.new('ns') + from.basename
end
@spec.copy_header_mappings[:ios].size.should == 1
@spec.copy_header_mappings[:ios][Pathname.new('SSZipArchive/ns')].sort.should == %w{
SSZipArchive.h
minizip/crypt.h
minizip/ioapi.h
minizip/mztools.h
minizip/unzip.h
minizip/zip.h
}.map { |f| Pathname.new("SSZipArchive/#{f}") }.sort
end
#it "returns a hash of mappings with a custom header dir prefix" do
#@spec.header_dir = 'AnotherRoot'
#@spec.copy_header_mappings[:ios][Pathname.new('AnotherRoot')].sort.should == %w{
#SSZipArchive.h
#minizip/crypt.h
#minizip/ioapi.h
#minizip/mztools.h
#minizip/unzip.h
#minizip/zip.h
#}.map { |f| Pathname.new("SSZipArchive/#{f}") }.sort
#end
xit "returns a hash of mappings with a custom header dir prefix" do
@spec.header_dir = 'AnotherRoot'
@spec.copy_header_mappings[:ios][Pathname.new('AnotherRoot')].sort.should == %w{
SSZipArchive.h
minizip/crypt.h
minizip/ioapi.h
minizip/mztools.h
minizip/unzip.h
minizip/zip.h
}.map { |f| Pathname.new("SSZipArchive/#{f}") }.sort
end
#it "returns the user header search paths" do
#def @spec.copy_header_mapping(from)
#Pathname.new('ns') + from.basename
#end
#@spec.header_search_paths.should == %w{
#"$(PODS_ROOT)/Headers/SSZipArchive"
#"$(PODS_ROOT)/Headers/SSZipArchive/ns"
#}
#end
xit "returns the user header search paths" do
def @spec.copy_header_mapping(from)
Pathname.new('ns') + from.basename
end
@spec.header_search_paths.should == %w{
"$(PODS_ROOT)/Headers/SSZipArchive"
"$(PODS_ROOT)/Headers/SSZipArchive/ns"
}
end
#it "returns the user header search paths with a custom header dir prefix" do
#@spec.header_dir = 'AnotherRoot'
#def @spec.copy_header_mapping(from)
#Pathname.new('ns') + from.basename
#end
#@spec.header_search_paths.should == %w{
#"$(PODS_ROOT)/Headers/AnotherRoot"
#"$(PODS_ROOT)/Headers/AnotherRoot/ns"
#}
#end
xit "returns the user header search paths with a custom header dir prefix" do
@spec.header_dir = 'AnotherRoot'
def @spec.copy_header_mapping(from)
Pathname.new('ns') + from.basename
end
@spec.header_search_paths.should == %w{
"$(PODS_ROOT)/Headers/AnotherRoot"
"$(PODS_ROOT)/Headers/AnotherRoot/ns"
}
end
#it "returns the list of files that the resources pattern expand to" do
#@spec.expanded_resources.should == {}
#@spec.resource = 'LICEN*'
#@spec.expanded_resources[:ios].map(&:to_s).should == %w{ SSZipArchive/LICENSE }
#@spec.expanded_resources[:osx].map(&:to_s).should == %w{ SSZipArchive/LICENSE }
#@spec.resources = 'LICEN*', 'Readme.*'
#@spec.expanded_resources[:ios].map(&:to_s).should == %w{ SSZipArchive/LICENSE SSZipArchive/Readme.markdown }
#@spec.expanded_resources[:osx].map(&:to_s).should == %w{ SSZipArchive/LICENSE SSZipArchive/Readme.markdown }
#end
#end
xit "returns the list of files that the resources pattern expand to" do
@spec.expanded_resources.should == {}
@spec.resource = 'LICEN*'
@spec.expanded_resources[:ios].map(&:to_s).should == %w{ SSZipArchive/LICENSE }
@spec.expanded_resources[:osx].map(&:to_s).should == %w{ SSZipArchive/LICENSE }
@spec.resources = 'LICEN*', 'Readme.*'
@spec.expanded_resources[:ios].map(&:to_s).should == %w{ SSZipArchive/LICENSE SSZipArchive/Readme.markdown }
@spec.expanded_resources[:osx].map(&:to_s).should == %w{ SSZipArchive/LICENSE SSZipArchive/Readme.markdown }
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