summaryrefslogtreecommitdiff
path: root/spec/bundler/spec_helper.rb
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-02 04:28:30 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-02 04:28:30 +0000
commitf35fb6d36c3218988b17dbeb4412922c23745f0e (patch)
tree00132d6596fa7521153143a0453aae7047c25127 /spec/bundler/spec_helper.rb
parent0b5432a7bd7d826a35fc2a1a860d44d4d7f8ff96 (diff)
Support Windows
* spec/bundler/spec_helper.rb: there are no reason to refuse ':' and '-' in the path of spec files. especially, ':' is always contained on Windows. * spec/bundler/spec/helper.rb: open3.rb is also supported on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/bundler/spec_helper.rb')
-rw-r--r--spec/bundler/spec_helper.rb13
1 files changed, 2 insertions, 11 deletions
diff --git a/spec/bundler/spec_helper.rb b/spec/bundler/spec_helper.rb
index cd87a65d54..37061ffb87 100644
--- a/spec/bundler/spec_helper.rb
+++ b/spec/bundler/spec_helper.rb
@@ -20,22 +20,13 @@ rescue LoadError
abort "Run rake spec:deps to install development dependencies"
end
-if File.expand_path(__FILE__) =~ %r{([^\w/\.])}
+if File.expand_path(__FILE__) =~ %r{([^\w/\.:\-])}
abort "The bundler specs cannot be run from a path that contains special characters (particularly #{$1.inspect})"
end
require "bundler"
-# Require the correct version of popen for the current platform
-if RbConfig::CONFIG["host_os"] =~ /mingw|mswin/
- begin
- require "win32/open3"
- rescue LoadError
- abort "Run `gem install win32-open3` to be able to run specs"
- end
-else
- require "open3"
-end
+require "open3"
Dir["#{File.expand_path("../support", __FILE__)}/*.rb"].each do |file|
file = file.gsub(%r{\A#{Regexp.escape File.expand_path("..", __FILE__)}/}, "")