spec/integration_2.rb
def check_with_folder(folder)
  source = File.expand_path("../integration/#{folder}", __FILE__)
  Dir.glob("#{source}/after/**/*") do |expected_path|
    next unless File.file?(expected_path)
    relative_path = expected_path.gsub("#{source}/after/", '')
    expected = Pathname.new(expected_path)
    produced = TMP_DIR + folder + relative_path

      case expected_path
      when %r[/xcuserdata/], %r[\.pbxproj$]
        # Projects are compared through the more readable yaml representation
        next
      when %r[execution_output.txt$]
        # TODO The output from the caches changes on Travis
        next
      end

      it relative_path do
        case expected_path
        when %r[Podfile\.lock$], %r[xcodeproj\.yaml$]
          file_should_exist(produced)
          yaml_should_match(expected, produced)
        else
          file_should_exist(produced)
          file_should_match(expected, produced)
        end
      end
  end
end
# Creates a requirement which compares every file in the after folder with the
# artifacts created by the pod executable in the temporary directory according
# to its file type.
#
# @param  [String] folder
#         the name of the folder of the tests.
#
Creates a requirement which compares every file in the after folder with the
artifacts created by the pod executable in the temporary directory according
to its file type.
Creates a requirement which compares every file in the after folder with the artifacts created by the pod executable in the temporary directory according to its file type .
def check_with_folder(folder)
  source = File.expand_path("../integration/#{folder}", __FILE__)
  Dir.glob("#{source}/after/**/*") do |expected_path|
    next unless File.file?(expected_path)
    relative_path = expected_path.gsub("#{source}/after/", '')
    expected = Pathname.new(expected_path)
    produced = TMP_DIR + folder + relative_path
      case expected_path
      when %r[/xcuserdata/], %r[\.pbxproj$]
        next
      when %r[execution_output.txt$]
        next
      end
      it relative_path do
        case expected_path
        when %r[Podfile\.lock$], %r[xcodeproj\.yaml$]
          file_should_exist(produced)
          yaml_should_match(expected, produced)
        else
          file_should_exist(produced)
          file_should_match(expected, produced)
        end
      end
  end
end
def check_with_folder ( folder ) source = File . expand_path ( "../integration/#{folder}" , __FILE__ ) Dir . glob ( "#{source}/after/**/*" ) do | expected_path | next unless File . file? ( expected_path ) relative_path = expected_path . gsub ( "#{source}/after/" , '' ) expected = Pathname . new ( expected_path ) produced = TMP_DIR + folder + relative_path case expected_path when %r[ /xcuserdata/ ] , %r[ \. pbxproj$ ] next when %r[ execution_output.txt$ ] next end it relative_path do case expected_path when %r[ Podfile \. lock$ ] , %r[ xcodeproj \. yaml$ ] file_should_exist ( produced ) yaml_should_match ( expected , produced ) else file_should_exist ( produced ) file_should_match ( expected , produced ) end end end end
Creates a requirement which compares every file in the after folder with the
artifacts created by the pod executable in the temporary directory according
to its file type.
Creates a requirement which compares every file in the after folder with the artifacts created by the pod executable in the temporary directory according to its file type .
# Projects are compared through the more readable yaml representation # TODO The output from the caches changes on Travis
folder
folder the name of the folder of the tests.
folder the name of the folder of the tests .