diff options
Diffstat (limited to 'spec/support/path.rb')
-rw-r--r-- | spec/support/path.rb | 6 |
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) |