Sha256: 75f735d7f02351b80cbf770ea3ab244851f595f36871bd3012dd386cc6d09fe2

Contents?: true

Size: 956 Bytes

Versions: 35

Compression:

Stored size: 956 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 = "MAIN_ACTIVITY=#{main_activity(app_path)} "\
          "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

35 entries across 35 versions & 1 rubygems

Version Path
calabash-android-0.4.20.1 bin/calabash-android-run.rb
calabash-android-0.5.1 bin/calabash-android-run.rb
calabash-android-0.5.0 bin/calabash-android-run.rb
calabash-android-0.5.0.pre2 bin/calabash-android-run.rb
calabash-android-0.5.0.pre1 bin/calabash-android-run.rb
calabash-android-0.4.22.pre4 bin/calabash-android-run.rb
calabash-android-0.4.22.pre3 bin/calabash-android-run.rb
calabash-android-0.4.22.pre1 bin/calabash-android-run.rb
calabash-android-0.4.21 bin/calabash-android-run.rb
calabash-android-0.4.20 bin/calabash-android-run.rb
calabash-android-0.4.19 bin/calabash-android-run.rb
calabash-android-0.4.19.pre4 bin/calabash-android-run.rb
calabash-android-0.4.19.pre3 bin/calabash-android-run.rb
calabash-android-0.4.19.pre2 bin/calabash-android-run.rb
calabash-android-0.4.19.pre1 bin/calabash-android-run.rb
calabash-android-0.4.18 bin/calabash-android-run.rb
calabash-android-0.4.16 bin/calabash-android-run.rb
calabash-android-0.4.15.pre2 bin/calabash-android-run.rb
calabash-android-0.4.15.pre1 bin/calabash-android-run.rb
calabash-android-0.4.14 bin/calabash-android-run.rb