diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2017-07-21 14:21:56 -0500 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2017-07-23 12:51:36 -0500 |
commit | dcd9963876f1405a19671a6bd34d42a6add9e16a (patch) | |
tree | 1cfee962063fdf074972211b6f0fe99ae329bf7b /spec/support/helpers.rb | |
parent | 07fedc3f9ee972d5da43f8a77a162bf2c9ca4b1b (diff) | |
download | bundler-dcd9963876f1405a19671a6bd34d42a6add9e16a.tar.gz |
Update the specs for the default bundle path being ./.bundle
Diffstat (limited to 'spec/support/helpers.rb')
-rw-r--r-- | spec/support/helpers.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/spec/support/helpers.rb b/spec/support/helpers.rb index 312e47d546..be187d5332 100644 --- a/spec/support/helpers.rb +++ b/spec/support/helpers.rb @@ -360,16 +360,19 @@ module Spec end def system_gems(*gems) + opts = gems.last.is_a?(Hash) ? gems.last : {} + path = opts.fetch(:path, system_gem_path) + path = ruby!("require 'bundler'; puts Bundler.bundle_path") if path == :bundle_path gems = gems.flatten - FileUtils.rm_rf(system_gem_path) - FileUtils.mkdir_p(system_gem_path) + FileUtils.rm_rf(path) + FileUtils.mkdir_p(path) Gem.clear_paths env_backup = ENV.to_hash - ENV["GEM_HOME"] = system_gem_path.to_s - ENV["GEM_PATH"] = system_gem_path.to_s + ENV["GEM_HOME"] = path.to_s + ENV["GEM_PATH"] = path.to_s ENV["BUNDLER_ORIG_GEM_PATH"] = nil install_gems(*gems) |