summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2021-08-06 11:20:31 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-08-31 19:06:14 +0900
commit21db5876caeb8f67dfef6f9010e4ab7639d39c1b (patch)
tree486515a4502b80ba339d98c5786dcf39f559649b /spec
parentea16a0df80c950861e180aa7a025f527ff2713d0 (diff)
[rubygems/rubygems] Respect `BUNDLE_USER_HOME` for global config location
https://github.com/rubygems/rubygems/commit/58fc31442f
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4789
Diffstat (limited to 'spec')
-rw-r--r--spec/bundler/commands/config_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/bundler/commands/config_spec.rb b/spec/bundler/commands/config_spec.rb
index 4e13a7903e..48f0ceab78 100644
--- a/spec/bundler/commands/config_spec.rb
+++ b/spec/bundler/commands/config_spec.rb
@@ -88,6 +88,16 @@ RSpec.describe ".bundle/config" do
bundle "config get path", :env => { "BUNDLE_USER_CONFIG" => bundle_user_config }
expect(out).to include("Set for the current user (#{bundle_user_config}): \"vendor\"")
end
+
+ context "when not explicitly configured, but BUNDLE_USER_HOME set" do
+ let(:bundle_user_home) { bundled_app(".bundle").to_s }
+
+ it "uses the right location" do
+ bundle "config set path vendor", :env => { "BUNDLE_USER_HOME" => bundle_user_home }
+ bundle "config get path", :env => { "BUNDLE_USER_HOME" => bundle_user_home }
+ expect(out).to include("Set for the current user (#{bundle_user_home}/config): \"vendor\"")
+ end
+ end
end
describe "global" do