lib/parallel_tests/tasks.rb in parallel_tests-2.14.2 vs lib/parallel_tests/tasks.rb in parallel_tests-2.14.3

- old
+ new

@@ -15,10 +15,11 @@ def run_in_parallel(cmd, options={}) count = " -n #{options[:count]}" unless options[:count].to_s.empty? executable = File.expand_path("../../../bin/parallel_test", __FILE__) command = "#{Shellwords.escape executable} --exec '#{cmd}'#{count}#{' --non-parallel' if options[:non_parallel]}" + command = ParallelTests.with_ruby_binary(command) abort unless system(command) end # this is a crazy-complex solution for a very simple problem: # removing certain lines from the output without changing the exit-status @@ -161,13 +162,10 @@ command = "#{Shellwords.escape executable} #{type} --type #{test_framework} " \ "-n #{count} " \ "--pattern '#{pattern}' " \ "--test-options '#{options}'" - if ParallelTests::WINDOWS - ruby_binary = File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name']) - command = "#{ruby_binary} #{command}" - end + command = ParallelTests.with_ruby_binary(command) abort unless system(command) # allow to chain tasks e.g. rake parallel:spec parallel:features end end end