summaryrefslogtreecommitdiff
path: root/spec/support/path.rb
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2017-07-24 13:32:57 -0500
committerSamuel Giddins <segiddins@segiddins.me>2017-07-24 13:32:57 -0500
commit323d6d2e09678f1c3a1653b0bdf1de2f05a86410 (patch)
treebc1791d02dce9c0dc0827220b7a6bd8bb396a1dd /spec/support/path.rb
parent217b25925ad6f6c67cf7b27c994a70e5098d58f5 (diff)
downloadbundler-323d6d2e09678f1c3a1653b0bdf1de2f05a86410.tar.gz
Untangle the system gem path and the default bundle path in the specs
Diffstat (limited to 'spec/support/path.rb')
-rw-r--r--spec/support/path.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/support/path.rb b/spec/support/path.rb
index cc9c5b3cad..54fc03c850 100644
--- a/spec/support/path.rb
+++ b/spec/support/path.rb
@@ -17,7 +17,11 @@ module Spec
end
def default_bundle_path(*path)
- system_gem_path(*path)
+ if Bundler::VERSION.split(".").first.to_i < 2
+ system_gem_path(*path)
+ else
+ bundled_app(*[".bundle", ENV.fetch("BUNDLER_SPEC_RUBY_ENGINE", Gem.ruby_engine), Gem::ConfigMap[:ruby_version], *path].compact)
+ end
end
def bundled_app(*path)