summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/dsl/reboot_pending_spec.rb4
-rw-r--r--spec/unit/formatters/error_inspectors/resource_failure_inspector_spec.rb4
2 files changed, 4 insertions, 4 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
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