summaryrefslogtreecommitdiff
path: root/spec/bundler/commands/config_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/bundler/commands/config_spec.rb')
-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