Commit f689cda8 authored by Eloy Durán's avatar Eloy Durán

Ensure all integration specs are run and fix specs on Travis & RBX

parent 17b8ab56
......@@ -43,18 +43,16 @@ else
$?.should.be.success
end
puts " ! ".red << "Skipping xcodebuild based checks, because it can't be found." if `which xcodebuild`.strip.empty?
puts " ! ".red << "Skipping xcodebuild based checks, because it can't be found." if skip_xcodebuild?
def should_xcodebuild(target_definition)
return if `which xcodebuilda`.strip.empty?
return if skip_xcodebuild?
target = target_definition
with_xcodebuild_available do
Dir.chdir(config.project_pods_root) do
print "[!] Compiling #{target.label}...\r"
should_successfully_perform "xcodebuild -target '#{target.label}'"
lib_path = config.project_pods_root + "build/Release#{'-iphoneos' if target.platform == :ios}" + target.lib_name
`lipo -info '#{lib_path}'`.should.include "architecture: #{target.platform == :ios ? 'armv7' : 'x86_64'}"
end
`lipo -info '#{lib_path}'`.should.include "#{target.platform == :ios ? 'armv7' : 'x86_64'}"
end
end
......
......@@ -22,6 +22,9 @@ require 'spec_helper/user_interface'
require 'spec_helper/pre_flight'
ENV['SKIP_SETUP'] = 'true'
if ENV['SKIP_XCODEBUILD'].nil? && `which xcodebuild`.strip.empty?
ENV['SKIP_XCODEBUILD'] = 'true'
end
require 'claide'
......@@ -31,8 +34,8 @@ module Bacon
include SpecHelper::Fixture
include SpecHelper::Command
def argv(*argv)
CLAide::ARGV.new(argv)
def skip_xcodebuild?
ENV['SKIP_XCODEBUILD']
end
end
end
......
......@@ -2,6 +2,10 @@ require 'spec_helper/temporary_directory'
module SpecHelper
module Command
def argv(*argv)
CLAide::ARGV.new(argv)
end
def command(*argv)
argv << '--no-color'
Pod::Command.parse(argv)
......
......@@ -94,12 +94,14 @@ describe "Pod::Command::Linter" do
linter.errors.join(' | ').should =~ /`config.ios\?' and `config.osx\?' are deprecated/
end
unless skip_xcodebuild?
it "uses xcodebuild to generate notes and warnings" do
file = write_podspec(stub_podspec)
linter = Pod::Command::Spec::Linter.new(file)
linter.lint
linter.result_type.should == :warning
linter.notes.join(' | ').should.include "JSONKit/JSONKit.m:1640:27: warning: equality comparison with extraneous parentheses" unless `which xcodebuild`.strip.empty?
linter.notes.join(' | ').should.include "JSONKit/JSONKit.m:1640:27: warning: equality comparison with extraneous parentheses"
end
end
it "checks for file patterns" 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