bin/calabash-android-run.rb in testautoa-0.4.0.pre19 vs bin/calabash-android-run.rb in testautoa-0.4.0

- old
+ new

@@ -11,11 +11,19 @@ puts "2) Replace #{old_runner} with #{new_rummer}" exit 1 end if app_path - build_test_server_if_needed(app_path) + unless File.exist?(test_server_path(app_path)) + if ARGV.include? "--no-build" + puts "No test server found for this combination of app and calabash version. Exiting!" + exit 1 + else + puts "No test server found for this combination of app and calabash version. Recreating test server." + calabash_build(app_path) + end + end test_server_path = test_server_path(app_path) if ENV["TEST_SERVER_PORT"] test_server_port = ENV["TEST_SERVER_PORT"] else @@ -30,10 +38,10 @@ env = "" end STDOUT.sync = true arguments = ARGV - ["--no-build"] - cmd = "#{RbConfig.ruby} -S cucumber #{arguments.join(" ")} #{env}" + cmd = "cucumber #{arguments.join(" ")} #{env}" log cmd exit_code = system(cmd) sleep(1) exit_code \ No newline at end of file