diff options
Diffstat (limited to 'spec/commands/doctor_spec.rb')
-rw-r--r-- | spec/commands/doctor_spec.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/spec/commands/doctor_spec.rb b/spec/commands/doctor_spec.rb index 4198678baa..d829f00092 100644 --- a/spec/commands/doctor_spec.rb +++ b/spec/commands/doctor_spec.rb @@ -22,11 +22,17 @@ RSpec.describe "bundle doctor" do end end + it "succeeds on a sane installation" do + bundle :doctor + + expect(exitstatus).to eq(0) + end + context "when all files in home are readable/writable" do before(:each) do stat = double("stat") unwritable_file = double("file") - allow(Find).to receive(:find).with(Bundler.home.to_s) { [unwritable_file] } + allow(Find).to receive(:find).with(Bundler.bundle_path.to_s) { [unwritable_file] } allow(File).to receive(:stat).with(unwritable_file) { stat } allow(stat).to receive(:uid) { Process.uid } allow(File).to receive(:writable?).with(unwritable_file) { true } @@ -66,7 +72,7 @@ RSpec.describe "bundle doctor" do before(:each) do @stat = double("stat") @unwritable_file = double("file") - allow(Find).to receive(:find).with(Bundler.home.to_s) { [@unwritable_file] } + allow(Find).to receive(:find).with(Bundler.bundle_path.to_s) { [@unwritable_file] } allow(File).to receive(:stat).with(@unwritable_file) { @stat } end |