spec/integration_2.rb
# Runs the Pod executable with the given arguments in the temporary directory.
#
# @param  [String] arguments
#         the arguments to pass to the CocoaPods binary.
#
# @note   If the pod binary is called with the ruby executable it requires
#         bundler ensuring that the execution is performed in the correct
#         environment.
#
Runs the Pod executable with the given arguments in the temporary directory.
Runs the Pod executable with the given arguments in the temporary directory .
def launch_binary(arguments, folder)
  command = "#{POD_BINARY} #{arguments} --verbose --no-color 2>&1"
  Dir.chdir(TMP_DIR + folder) do
    output = `#{command}`
    it "$ pod #{arguments}" do
      $?.should.satisfy("Pod binary failed\n\n#{output}") do
        $?.success?
      end
    end
    File.open('execution_output.txt', 'w') do |file|
      file.write(command.gsub(POD_BINARY, '$ pod'))
      file.write(output.gsub(ROOT.to_s, 'ROOT').gsub(%r[/Users/.*/Library/Caches/CocoaPods/],"CACHES_DIR/"))
    end
  end
  $?.success?
end
def launch_binary ( arguments , folder ) command = "#{POD_BINARY} #{arguments} --verbose --no-color 2>&1" Dir . chdir ( TMP_DIR + folder ) do output = ` #{ command } ` it "$ pod #{arguments}" do $? . should . satisfy ( "Pod binary failed\n\n#{output}" ) do $? . success? end end File . open ( 'execution_output.txt' , 'w' ) do | file | file . write ( command . gsub ( POD_BINARY , '$ pod' ) ) file . write ( output . gsub ( ROOT . to_s , 'ROOT' ) . gsub ( %r[ /Users/.*/Library/Caches/CocoaPods/ ] , "CACHES_DIR/" ) ) end end $? . success? end
Runs the Pod executable with the given arguments in the temporary directory.
Runs the Pod executable with the given arguments in the temporary directory .
arguments
folder
arguments the arguments to pass to the CocoaPods binary.
arguments the arguments to pass to the CocoaPods binary .
note
If the pod binary is called with the ruby executable it requires bundler ensuring that the execution is performed in the correct environment.
If the pod binary is called with the ruby executable it requires bundler ensuring that the execution is performed in the correct environment .