summaryrefslogtreecommitdiff
path: root/spec/bundler/bundler/env_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/bundler/bundler/env_spec.rb')
-rw-r--r--spec/bundler/bundler/env_spec.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/spec/bundler/bundler/env_spec.rb b/spec/bundler/bundler/env_spec.rb
index 7686fe386a..9631a109bd 100644
--- a/spec/bundler/bundler/env_spec.rb
+++ b/spec/bundler/bundler/env_spec.rb
@@ -41,9 +41,15 @@ RSpec.describe Bundler::Env do
end
it "prints user path" do
- with_clear_paths("HOME", "/a/b/c") do
+ if Gem::VERSION >= "3.2.0.pre.1"
+ allow(Gem).to receive(:data_home) { "/a/b/c/.local/share" }
out = described_class.report
- expect(out).to include("User Path /a/b/c/.gem")
+ expect(out).to include("User Path /a/b/c/.local/share/gem")
+ else
+ with_clear_paths("HOME", "/a/b/c") do
+ out = described_class.report
+ expect(out).to include("User Path /a/b/c/.gem")
+ end
end
end