diff options
Diffstat (limited to 'spec/commands/doctor_spec.rb')
-rw-r--r-- | spec/commands/doctor_spec.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/spec/commands/doctor_spec.rb b/spec/commands/doctor_spec.rb index 6d2c5ef6a3..ef33bedb57 100644 --- a/spec/commands/doctor_spec.rb +++ b/spec/commands/doctor_spec.rb @@ -1,5 +1,6 @@ # frozen_string_literal: true +require "find" require "stringio" require "bundler/cli" require "bundler/cli/doctor" @@ -68,8 +69,9 @@ RSpec.describe "bundle doctor" do allow(File).to receive(:readable?).with(unwritable_file) { false } expect { doctor.run }.not_to raise_error expect(@stdout.string).to include( - "Files exist in Bundler home that are not readable/writable to the current user. These files are:\n - #{unwritable_file}" + "Files exist in the Bundler home that are not readable/writable to the current user. These files are:\n - #{unwritable_file}" ) + expect(@stdout.string).not_to include("No issues") end it "exits with a warning if home contains files that are read/write but not owned by current user" do @@ -82,7 +84,8 @@ RSpec.describe "bundle doctor" do allow(File).to receive(:readable?).with(unwritable_file) { true } expect { Bundler::CLI::Doctor.new({}).run }.not_to raise_error expect(@stdout.string).to include( - "Files exist in Bundler home that are owned by another user, but are stil readable/writable. These files are:\n - #{unwritable_file}" + "Files exist in the Bundler home that are owned by another user, but are stil readable/writable. These files are:\n - #{unwritable_file}" ) + expect(@stdout.string).not_to include("No issues") end end |