diff options
author | Ellen Marie Dash <me@duckie.co> | 2023-09-29 21:48:44 -0400 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-10-11 19:07:27 +0000 |
commit | ee9cb86bb49db0fe1613a5121a89587630506780 (patch) | |
tree | 92f5d31587fe57558a055dbce601875e8886dfaf /spec | |
parent | 0b9b07a717a31b7f3c87a9097c9fe1833efe9b1d (diff) |
[rubygems/rubygems] Split out Gem::PathSupport#default_home_dir to fix "bundle doctor" specs.
https://github.com/rubygems/rubygems/commit/d7f3f901f1
Diffstat (limited to 'spec')
-rw-r--r-- | spec/bundler/commands/doctor_spec.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/bundler/commands/doctor_spec.rb b/spec/bundler/commands/doctor_spec.rb index 13aaf2670c..4a8d0d6f46 100644 --- a/spec/bundler/commands/doctor_spec.rb +++ b/spec/bundler/commands/doctor_spec.rb @@ -38,6 +38,10 @@ RSpec.describe "bundle doctor" do allow(stat).to receive(:uid) { Process.uid } allow(File).to receive(:writable?).with(unwritable_file) { true } 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)) end it "exits with no message if the installed gem has no C extensions" do |