lib/parallel_tests/gherkin/runner.rb in parallel_tests-0.16.8 vs lib/parallel_tests/gherkin/runner.rb in parallel_tests-0.16.9
- old
+ new
@@ -5,10 +5,12 @@
module Gherkin
class Runner < ParallelTests::Test::Runner
class << self
def run_tests(test_files, process_number, num_processes, options)
- sanitized_test_files = test_files.map { |val| Shellwords.escape(val) }
+ windows = (RbConfig::CONFIG['host_os'] =~ /cygwin|mswin|mingw|bccwin|wince|emx/) #Shellwords doesn't work for windows
+ sanitized_test_files = test_files.map { |val| windows ? "\"#{val}\"" : Shellwords.escape(val) }
+
options = options.merge(:env => {"AUTOTEST" => "1"}) if $stdout.tty? # display color when we are in a terminal
cmd = [
executable,
(runtime_logging if File.directory?(File.dirname(runtime_log))),
cucumber_opts(options[:test_options]),