diff options
author | Guillermo Iguaran <guilleiguaran@gmail.com> | 2016-11-15 22:05:14 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-15 22:05:14 -0500 |
commit | c2c6b7be23126834b01273bfa95f90dac06513f6 (patch) | |
tree | 5443849b32d4833596b51f70bb84233fab315e92 /activesupport | |
parent | bce3d1f8c01a125ef56d82967cb23daa258bb58d (diff) | |
parent | 326147045262c49d0389c5a275570cb913a1a03b (diff) | |
download | rails-c2c6b7be23126834b01273bfa95f90dac06513f6.tar.gz rails-c2c6b7be23126834b01273bfa95f90dac06513f6.tar.bz2 rails-c2c6b7be23126834b01273bfa95f90dac06513f6.zip |
Merge pull request #27056 from kirs/fix-testing-isolation
Fix testing isolation
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/testing/isolation.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/testing/isolation.rb b/activesupport/lib/active_support/testing/isolation.rb index d30b34ecd6..404efe50bf 100644 --- a/activesupport/lib/active_support/testing/isolation.rb +++ b/activesupport/lib/active_support/testing/isolation.rb @@ -2,6 +2,7 @@ module ActiveSupport module Testing module Isolation require "thread" + require "shellwords" def self.included(klass) #:nodoc: klass.class_eval do @@ -80,7 +81,7 @@ module ActiveSupport load_paths = $-I.map { |p| "-I\"#{File.expand_path(p)}\"" }.join(" ") orig_args = ORIG_ARGV.join(" ") - test_opts = "-n#{self.class.name}##{self.name}" + test_opts = "-n#{self.class.name}##{Shellwords.escape(self.name)}" command = "#{Gem.ruby} #{load_paths} #{$0} '#{orig_args}' #{test_opts}" # IO.popen lets us pass env in a cross-platform way |