Ah ok... so AUTOTEST => 1 is always being set with this code... I'll look into different ways of doing it then.


________________________________
 From: Michael Grosser <notifications@github.com>
To: grosser/parallel_tests <parallel_tests@noreply.github.com> 
Cc: nightbeast <westlake_m@Yahoo.com> 
Sent: Thursday, September 12, 2013 11:40 PM
Subject: Re: [parallel_tests] Allow environment variables to be passed in to the command (#259)
 


In lib/parallel_tests/gherkin/runner.rb:
> @@ -8,7 +8,7 @@ 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) }
> -          options = options.merge(:env => {"AUTOTEST" => "1"}) if $stdout.tty? # display color when we are in a terminal
> +          (options[:env] || {}).merge!("AUTOTEST" => "1") if $stdout.tty? # display color when we are in a terminal 
current version:
2.0.0-p247 :001 > options = {} => {}
2.0.0-p247 :002 > (options[:env] || {}).merge!("AUTOTEST" => "1") => {"AUTOTEST"=>"1"}
2.0.0-p247 :003 > options => {} 
fixed version:
2.0.0-p247 :001 > options = {} => {}
2.0.0-p247 :002 > (options[:env] ||= {}).merge!("AUTOTEST" => "1") => {"AUTOTEST"=>"1"}
2.0.0-p247 :003 > options => {:env=>{"AUTOTEST"=>"1"}} 
—
Reply to this email directly or view it on GitHub.