diff options
author | Tim Smith <tsmith84@gmail.com> | 2021-01-26 08:21:19 -0800 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2021-02-02 11:50:43 -0800 |
commit | 5a2bab642653a715cd73be1f04062e37322b82a7 (patch) | |
tree | 0628a51dc69dfb2733bec04d612d065141192273 /spec/unit/dsl/reboot_pending_spec.rb | |
parent | 96e1f6d3f52e0ce6e66087ede8b65bf342154a26 (diff) | |
download | chef-file_exists.tar.gz |
Replace deprecated File.exists? with File.exist? in more placesfile_exists
Just some boring cleanup
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec/unit/dsl/reboot_pending_spec.rb')
-rw-r--r-- | spec/unit/dsl/reboot_pending_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/unit/dsl/reboot_pending_spec.rb b/spec/unit/dsl/reboot_pending_spec.rb index 4fed3be442..3ad1be9e38 100644 --- a/spec/unit/dsl/reboot_pending_spec.rb +++ b/spec/unit/dsl/reboot_pending_spec.rb @@ -57,12 +57,12 @@ describe Chef::DSL::RebootPending do end it "should return true if /var/run/reboot-required exists" do - allow(File).to receive(:exists?).with("/var/run/reboot-required").and_return(true) + allow(File).to receive(:exist?).with("/var/run/reboot-required").and_return(true) expect(recipe.reboot_pending?).to be_truthy end it "should return false if /var/run/reboot-required does not exist" do - allow(File).to receive(:exists?).with("/var/run/reboot-required").and_return(false) + allow(File).to receive(:exist?).with("/var/run/reboot-required").and_return(false) expect(recipe.reboot_pending?).to be_falsey end end |