Sha256: 10f24be04d30a7c528b9c6229387e2bc8e97554ddeeaae760f9f3e1bf2befcf3

Contents?: true

Size: 1016 Bytes

Versions: 50

Compression:

Stored size: 1016 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)

    main_activity = ENV['MAIN_ACTIVITY'] || main_activity(app_path)

    env = "MAIN_ACTIVITY=#{main_activity} "\
          "APP_PATH=\"#{app_path}\" "\
          "TEST_APP_PATH=\"#{test_server_path}\""
  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

50 entries across 50 versions & 1 rubygems

Version Path
calabash-android-0.7.3 bin/calabash-android-run.rb
calabash-android-0.7.3.pre3 bin/calabash-android-run.rb
calabash-android-0.7.3.preintentstart5 bin/calabash-android-run.rb
calabash-android-0.7.3.preintentstart4 bin/calabash-android-run.rb
calabash-android-0.7.3.preintentstart3 bin/calabash-android-run.rb
calabash-android-0.7.3.preintentstart2 bin/calabash-android-run.rb
calabash-android-0.7.3.preintentstart1 bin/calabash-android-run.rb
calabash-android-0.7.3.pre2 bin/calabash-android-run.rb
calabash-android-0.7.3.pre1 bin/calabash-android-run.rb
calabash-android-0.7.2 bin/calabash-android-run.rb
calabash-android-0.7.1 bin/calabash-android-run.rb
calabash-android-0.7.0 bin/calabash-android-run.rb
calabash-android-0.6.1.pre2 bin/calabash-android-run.rb
calabash-android-0.6.1.pre1 bin/calabash-android-run.rb
calabash-android-0.6.0.prelatestcrosswalk bin/calabash-android-run.rb
calabash-android-0.6.0 bin/calabash-android-run.rb
calabash-android-0.6.0.pre4 bin/calabash-android-run.rb
calabash-android-0.5.16.pre1 bin/calabash-android-run.rb
calabash-android-0.5.15.coordinate.pre.fix2 bin/calabash-android-run.rb
calabash-android-0.5.15.coordinate.pre.fix bin/calabash-android-run.rb