Commit fe3d6a53 authored by Fabio Pelosin's avatar Fabio Pelosin

Reference the integration spec files from a submodule pointing to…

Reference the integration spec files from a submodule pointing to CocoaPods/cocoapods-integration-specs
parent 9569aa77
...@@ -17,3 +17,6 @@ ...@@ -17,3 +17,6 @@
[submodule "spec/fixtures/integration/Reachability"] [submodule "spec/fixtures/integration/Reachability"]
path = spec/fixtures/integration/Reachability path = spec/fixtures/integration/Reachability
url = https://github.com/tonymillion/Reachability.git url = https://github.com/tonymillion/Reachability.git
[submodule "spec/cocoapods-integration-specs"]
path = spec/cocoapods-integration-specs
url = https://github.com/CocoaPods/cocoapods-integration-specs
...@@ -182,7 +182,12 @@ namespace :spec do ...@@ -182,7 +182,12 @@ namespace :spec do
#--------------------------------------# #--------------------------------------#
desc "Run the integration spec" desc "Run the integration spec"
task :integration => :unpack_fixture_tarballs do task :integration do
unless File.exists?('spec/cocoapods-integration-specs')
$stderr.puts "Integration files not checked out. Run `rake bootstrap`"
exit 1
end
sh "bundle exec bacon spec/integration.rb" sh "bundle exec bacon spec/integration.rb"
end end
...@@ -268,7 +273,7 @@ namespace :spec do ...@@ -268,7 +273,7 @@ namespace :spec do
title 'Storing fixtures' title 'Storing fixtures'
# Copy the files to the files produced by the specs to the after folders # Copy the files to the files produced by the specs to the after folders
FileList['tmp/*'].each do |source| FileList['tmp/*'].each do |source|
destination = "spec/integration/#{source.gsub('tmp/','')}/after" destination = "spec/cocoapods-integration-specs/#{source.gsub('tmp/','')}/after"
if File.exists?(destination) if File.exists?(destination)
sh "rm -rf #{destination}" sh "rm -rf #{destination}"
sh "mv #{source} #{destination}" sh "mv #{source} #{destination}"
...@@ -280,6 +285,9 @@ namespace :spec do ...@@ -280,6 +285,9 @@ namespace :spec do
FileList['spec/integration/*/after/{Podfile,*.podspec,**/*.xcodeproj,PodTest-hg-source}'].each do |to_delete| FileList['spec/integration/*/after/{Podfile,*.podspec,**/*.xcodeproj,PodTest-hg-source}'].each do |to_delete|
sh "rm -rf #{to_delete}" sh "rm -rf #{to_delete}"
end end
puts
puts "Integration fixtures updated, commit and push in the `spec/cocoapods-integration-specs` submodule"
end end
#--------------------------------------# #--------------------------------------#
......
Subproject commit 44b03f0ae223452272211d52f2fee15472bd0b7a
...@@ -73,7 +73,7 @@ POD_BINARY = "ruby " + ROOT.to_s + '/bin/pod' unless defined? POD_BINARY ...@@ -73,7 +73,7 @@ POD_BINARY = "ruby " + ROOT.to_s + '/bin/pod' unless defined? POD_BINARY
# the name of the folder of the tests. # the name of the folder of the tests.
# #
def copy_files(folder) def copy_files(folder)
source = File.expand_path("../integration/#{folder}/before", __FILE__) source = File.expand_path("../cocoapods-integration-specs/#{folder}/before", __FILE__)
destination = TMP_DIR + folder destination = TMP_DIR + folder
destination.mkpath destination.mkpath
FileUtils.cp_r(Dir.glob("#{source}/*"), destination) FileUtils.cp_r(Dir.glob("#{source}/*"), destination)
...@@ -135,7 +135,7 @@ end ...@@ -135,7 +135,7 @@ end
# the name of the folder of the tests. # the name of the folder of the tests.
# #
def check_with_folder(folder) def check_with_folder(folder)
source = File.expand_path("../integration/#{folder}", __FILE__) source = File.expand_path("../cocoapods-integration-specs/#{folder}", __FILE__)
Dir.glob("#{source}/after/**/*") do |expected_path| Dir.glob("#{source}/after/**/*") do |expected_path|
next unless File.file?(expected_path) next unless File.file?(expected_path)
relative_path = expected_path.gsub("#{source}/after/", '') relative_path = expected_path.gsub("#{source}/after/", '')
...@@ -297,7 +297,7 @@ end ...@@ -297,7 +297,7 @@ end
#-----------------------------------------------------------------------------# #-----------------------------------------------------------------------------#
describe "Integration take 2" do describe "Integration" do
TMP_DIR.rmtree if TMP_DIR.exist? TMP_DIR.rmtree if TMP_DIR.exist?
TMP_DIR.mkpath TMP_DIR.mkpath
......
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