Sha256: 10e4cc2dee0ba0b329a266eba36a5d83ded81f68b7c44d78dc6c5640843b7b5a
Contents?: true
Size: 1.15 KB
Versions: 10
Compression:
Stored size: 1.15 KB
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 end if app_path unless File.exist?(test_server_path(app_path)) puts "No test server found for this combination of app and calabash version. Rebuilding test server." calabash_build(app_path) end test_server_path = test_server_path(app_path) env = "PACKAGE_NAME=#{package_name(app_path)} "\ "TEST_PACKAGE_NAME=#{package_name(test_server_path)} "\ "APP_PATH=\"#{app_path}\" "\ "TEST_APP_PATH=\"#{test_server_path}\" "\ "TEST_SERVER_PORT=34777" else env = "" end STDOUT.sync = true cmd = "cucumber -c #{ARGV.join(" ")} #{env}" puts cmd IO.popen(cmd) do |io| io.each { |s| print s } end sleep(1) end
Version data entries
10 entries across 10 versions & 1 rubygems