Sha256: c95dc6b0ef429dc8587453c9c477549f2bf48fc643ab55de70b4c9f6b4d455ed

Contents?: true

Size: 988 Bytes

Versions: 30

Compression:

Stored size: 988 Bytes

Contents

def calabash_run(app_path = nil)

  old_runner = "android.test.InstrumentationTestRunner"
  new_rummer = "sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner"
  f = "features/support/app_life_cycle_hooks.rb"

  if File.exist?(f) and IO.read(f).include? old_runner
    puts "Calabash has been updated"
    puts "Please do the following to update your project:"
    puts "1) Open #{f} in a text editor"
    puts "2) Replace #{old_runner} with #{new_rummer}"
    exit 1
  end

  if app_path
    build_test_server_if_needed(app_path)

    test_server_path = test_server_path(app_path)

    env = "APP_PATH=\"#{app_path}\" TEST_APP_PATH=\"#{test_server_path}\""

    if ENV['MAIN_ACTIVITY']
      env = "#{env} MAIN_ACTIVITY=#{ENV['MAIN_ACTIVITY']}"
    end
  else
    env = ""
  end

  STDOUT.sync = true
  arguments = ARGV - ["--no-build"]
  cmd = "\"#{RbConfig.ruby}\" -S cucumber #{arguments.join(" ")} #{env}"
  log cmd
  exit_code = system(cmd)

  sleep(1)
  exit_code
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
calabash-android-0.9.22 bin/calabash-android-run.rb
calabash-android-0.9.21 bin/calabash-android-run.rb
calabash-android-0.9.20 bin/calabash-android-run.rb
calabash-android-0.9.19 bin/calabash-android-run.rb
calabash-android-0.9.18 bin/calabash-android-run.rb
calabash-android-0.9.17 bin/calabash-android-run.rb
calabash-android-0.9.16 bin/calabash-android-run.rb
calabash-android-0.9.14 bin/calabash-android-run.rb
calabash-android-0.9.12 bin/calabash-android-run.rb
calabash-android-0.9.11 bin/calabash-android-run.rb
calabash-android-0.9.10 bin/calabash-android-run.rb
calabash-android-0.9.9 bin/calabash-android-run.rb
calabash-android-0.9.8 bin/calabash-android-run.rb
calabash-android-0.9.7 bin/calabash-android-run.rb
calabash-android-0.9.6 bin/calabash-android-run.rb
calabash-android-0.9.5 bin/calabash-android-run.rb
calabash-android-0.9.4 bin/calabash-android-run.rb
calabash-android-0.9.3 bin/calabash-android-run.rb
calabash-android-0.9.2 bin/calabash-android-run.rb
calabash-android-0.9.1.pre2 bin/calabash-android-run.rb