summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2016-09-30 16:45:34 -0500
committerSamuel Giddins <segiddins@segiddins.me>2016-09-30 17:05:09 -0500
commitd967ea961a1c269751344f00c75956892eb71a35 (patch)
tree6cb0839a687c58a66687f31cc2588db33d9cd96e
parent1ba797729ab6bb107832aaf823f525874074d378 (diff)
downloadbundler-seg-specs-no-spaces.tar.gz
Fail fast in the specs when running from a path with special charactersseg-specs-no-spaces
-rw-r--r--spec/spec_helper.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index a3251ea640..642bfabc18 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -17,6 +17,10 @@ rescue LoadError
abort "Run rake spec:deps to install development dependencies"
end
+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