diff options
author | Alexey Gaziev <alex.gaziev@gmail.com> | 2015-04-19 12:18:16 +0800 |
---|---|---|
committer | Alexey Gaziev <alex.gaziev@gmail.com> | 2015-04-19 12:18:16 +0800 |
commit | 61103ac7b0801201533e2c853957da4d80d81b51 (patch) | |
tree | ef61efd9b0b305eb57cdac9b8115f4532d21445e /activesupport | |
parent | c8bab30ce5a7a40be7a3c7c4271e8ae6d2b303bb (diff) | |
download | rails-61103ac7b0801201533e2c853957da4d80d81b51.tar.gz rails-61103ac7b0801201533e2c853957da4d80d81b51.tar.bz2 rails-61103ac7b0801201533e2c853957da4d80d81b51.zip |
MRI compatible code for ActiveSupport::Testing::Isolation::Subprocess
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/testing/isolation.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/testing/isolation.rb b/activesupport/lib/active_support/testing/isolation.rb index 247df7423b..1de0a19998 100644 --- a/activesupport/lib/active_support/testing/isolation.rb +++ b/activesupport/lib/active_support/testing/isolation.rb @@ -69,17 +69,17 @@ module ActiveSupport else Tempfile.open("isolation") do |tmpfile| env = { - ISOLATION_TEST: self.class.name, - ISOLATION_OUTPUT: tmpfile.path + 'ISOLATION_TEST' => self.class.name, + 'ISOLATION_OUTPUT' => tmpfile.path } load_paths = $-I.map {|p| "-I\"#{File.expand_path(p)}\"" }.join(" ") orig_args = ORIG_ARGV.join(" ") test_opts = "-n#{self.class.name}##{self.name}" - command = "#{Gem.ruby} #{load_paths} #{$0} #{orig_args} #{test_opts}" + command = "#{Gem.ruby} #{load_paths} #{$0} '#{orig_args}' #{test_opts}" # IO.popen lets us pass env in a cross-platform way - child = IO.popen([env, command]) + child = IO.popen(env, command) begin Process.wait(child.pid) |