summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2021-07-30 10:30:24 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-08-31 19:06:14 +0900
commit0ab160e2e0b959054c28b06f1ada3f015c9f3bc3 (patch)
tree20e022066ec64e4012996cbc4dfaf08254d857f9 /spec
parentd37c2441ccd7dcdcedc317065c0f8141f9a66714 (diff)
[rubygems/rubygems] Respect `BUNDLE_USER_CONFIG` if set
https://github.com/rubygems/rubygems/commit/f28ab141af
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4789
Diffstat (limited to 'spec')
-rw-r--r--spec/bundler/commands/config_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/bundler/commands/config_spec.rb b/spec/bundler/commands/config_spec.rb
index 1ef84c8195..4e13a7903e 100644
--- a/spec/bundler/commands/config_spec.rb
+++ b/spec/bundler/commands/config_spec.rb
@@ -76,6 +76,20 @@ RSpec.describe ".bundle/config" do
end
end
+ describe "config location" do
+ let(:bundle_user_config) { File.join(Dir.home, ".config/bundler") }
+
+ before do
+ Dir.mkdir File.dirname(bundle_user_config)
+ end
+
+ it "can be configured through BUNDLE_USER_CONFIG" do
+ bundle "config set path vendor", :env => { "BUNDLE_USER_CONFIG" => bundle_user_config }
+ 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
+ end
+
describe "global" do
before(:each) do
install_gemfile <<-G