aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorGuillermo Iguaran <guilleiguaran@gmail.com>2016-11-15 22:05:14 -0500
committerGitHub <noreply@github.com>2016-11-15 22:05:14 -0500
commitc2c6b7be23126834b01273bfa95f90dac06513f6 (patch)
tree5443849b32d4833596b51f70bb84233fab315e92 /activesupport
parentbce3d1f8c01a125ef56d82967cb23daa258bb58d (diff)
parent326147045262c49d0389c5a275570cb913a1a03b (diff)
downloadrails-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.rb3
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