Commit 385d9b38 authored by Eloy Duran's avatar Eloy Duran

Don’t break when there’s no rootspec. Closes #30.

parent 78c554e3
......@@ -55,11 +55,11 @@ module Pod
end
def ios?
rootspec.platform == :ios
rootspec.platform == :ios if rootspec
end
def osx?
rootspec.platform == :osx
rootspec.platform == :osx if rootspec
end
module Mixin
......
......@@ -32,14 +32,20 @@ else
Pod::Source.reset!
Pod::Spec::Set.reset!
fixture('spec-repos/master') # ensure the archive is unpacked
@config_before = config
Pod::Config.instance = nil
config.silent = true
config.repos_dir = fixture('spec-repos')
config.project_pods_root = temporary_directory + 'Pods'
def config.ios?; true; end
def config.osx?; false; end
FileUtils.cp_r(fixture('integration/.'), config.project_pods_root)
end
after do
config.project_pods_root = nil
config.repos_dir = SpecHelper.tmp_repos_path
Pod::Config.instance = @config_before
end
# TODO add a simple source file which uses the compiled lib to check that it really really works
......
......@@ -17,14 +17,19 @@ describe "Pod::Installer" do
end
before do
config.project_pods_root = fixture('integration')
fixture('spec-repos/master') # ensure the archive is unpacked
@config_before = config
Pod::Config.instance = nil
config.silent = true
config.repos_dir = fixture('spec-repos')
config.project_pods_root = fixture('integration')
def config.ios?; true; end
def config.osx?; false; end
end
after do
config.project_pods_root = nil
config.repos_dir = SpecHelper.tmp_repos_path
Pod::Config.instance = @config_before
end
it "generates a BridgeSupport metadata file from all the pod headers" do
......@@ -54,8 +59,8 @@ describe "Pod::Installer" do
'"$(BUILT_PRODUCTS_DIR)/Pods/Reachability"',
"ALWAYS_SEARCH_USER_PATHS" => "YES",
"OTHER_LDFLAGS" => "-ObjC -all_load " \
"-framework SystemConfiguration -framework CFNetwork " \
"-framework MobileCoreServices -l z.1"
"-framework SystemConfiguration -framework MobileCoreServices " \
"-framework CFNetwork -lz.1"
}
],
[
......@@ -81,7 +86,7 @@ describe "Pod::Installer" do
"HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2",
"OTHER_LDFLAGS" => "-ObjC -all_load " \
"-l xml2.2.7.3 -framework SystemConfiguration " \
"-framework CFNetwork -framework MobileCoreServices -l z.1"
"-framework MobileCoreServices -framework CFNetwork -lz.1"
}
],
].each do |name, patterns, expected_patterns, xcconfig|
......
......@@ -23,11 +23,16 @@ end
describe "Pod::Resolver" do
before do
fixture('spec-repos/master') # ensure the archive is unpacked
@config_before = config
Pod::Config.instance = nil
config.silent = true
config.repos_dir = fixture('spec-repos')
def config.ios?; true; end
def config.osx?; false; end
end
after do
config.repos_dir = SpecHelper.tmp_repos_path
Pod::Config.instance = @config_before
end
it "returns all sets needed for the dependency" 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