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/formatters | |
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/formatters')
-rw-r--r-- | spec/unit/formatters/error_inspectors/resource_failure_inspector_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/unit/formatters/error_inspectors/resource_failure_inspector_spec.rb b/spec/unit/formatters/error_inspectors/resource_failure_inspector_spec.rb index 9d8fb050da..6693eded03 100644 --- a/spec/unit/formatters/error_inspectors/resource_failure_inspector_spec.rb +++ b/spec/unit/formatters/error_inspectors/resource_failure_inspector_spec.rb @@ -115,7 +115,7 @@ describe Chef::Formatters::ErrorInspectors::ResourceFailureInspector do # fake code to run through #recipe_snippet source_file = [ "if true", "var = non_existent", "end" ] allow(IO).to receive(:readlines).and_return(source_file) - allow(File).to receive(:exists?).and_return(true) + allow(File).to receive(:exist?).and_return(true) end it "parses a Windows path" do @@ -141,7 +141,7 @@ describe Chef::Formatters::ErrorInspectors::ResourceFailureInspector do context "when the recipe file does not exist" do before do - allow(File).to receive(:exists?).and_return(false) + allow(File).to receive(:exist?).and_return(false) allow(IO).to receive(:readlines).and_raise(Errno::ENOENT) end |