summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorEllen Marie Dash <me@duckie.co>2023-09-29 23:50:30 -0400
committergit <svn-admin@ruby-lang.org>2023-10-11 19:07:28 +0000
commitc83f8ad8671afbd8e9ae70c2c4e69a80c6a96d67 (patch)
tree003505d5ad2dd0ca5728b53654f90f7a8414a5d7 /spec
parente84b73398b96ea7abbeb3a17caae71b365f5016d (diff)
[rubygems/rubygems] Simplify logic for Gem::PathSupport#home, and make GEM_HOME always overide it.
https://github.com/rubygems/rubygems/commit/64273fd7e3
Diffstat (limited to 'spec')
-rw-r--r--spec/bundler/commands/doctor_spec.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/bundler/commands/doctor_spec.rb b/spec/bundler/commands/doctor_spec.rb
index 4a8d0d6f46..9eb496b0b2 100644
--- a/spec/bundler/commands/doctor_spec.rb
+++ b/spec/bundler/commands/doctor_spec.rb
@@ -40,8 +40,9 @@ RSpec.describe "bundle doctor" do
allow(File).to receive(:readable?).with(unwritable_file) { true }
# The following 2 lines are for `Gem::PathSupport#initialize`.
- allow(File).to receive(:exist?).with(Gem.paths.send(:default_home_dir))
- allow(File).to receive(:writable?).with(Gem.paths.send(:default_home_dir))
+ allow(File).to receive(:exist?).with(Gem.default_dir)
+ allow(File).to receive(:writable?).with(Gem.default_dir)
+ allow(File).to receive(:writable?).with(File.expand_path("..", Gem.default_dir))
end
it "exits with no message if the installed gem has no C extensions" do