# Needs to have this name

FileUtils.mkdir_p(FASTLANE_SPEC_SCRATCH)

default_platform(:ios)

lane(:test) do
  File.write("#{FASTLANE_SPEC_SCRATCH}/tests.txt", Time.now.to_s)
  1
end

platform(:ios) do
  lane(:beta) do
    File.write("#{FASTLANE_SPEC_SCRATCH}/mac_beta.txt", Time.now.to_s)
    frameit
    team_id('123')
    team_id('123')
  end

  lane(:empty) do
    # nothing going on here
  end

  desc("This action does nothing")
  desc("but crash")
  lane(:crashy) do
    raise "my exception"
  end
end

before_all do |lane|
  File.write("#{FASTLANE_SPEC_SCRATCH}/before_all.txt", Time.now.to_s)
end

lane(:anotherroot) do
  File.write("#{FASTLANE_SPEC_SCRATCH}/another_root.txt", Time.now.to_s)
end

error do
  File.write("#{FASTLANE_SPEC_SCRATCH}/error.txt", Time.now.to_s)
end
