summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2021-06-17 15:07:30 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2021-06-21 17:07:23 -0700
commitaeb27a1fa59225e4a42e72d02fdcc57e6a8f8cc6 (patch)
tree5369ddb6b341648f210a514bd1d64a2f2a4018df
parent3e30faf4b7e171bca29f3a079ed53ca0e4e058c0 (diff)
downloadchef-aeb27a1fa59225e4a42e72d02fdcc57e6a8f8cc6.tar.gz
fix File.exist stubbing
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r--spec/unit/provider/apt_update_spec.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/unit/provider/apt_update_spec.rb b/spec/unit/provider/apt_update_spec.rb
index 6e11235e30..4f6d619ccb 100644
--- a/spec/unit/provider/apt_update_spec.rb
+++ b/spec/unit/provider/apt_update_spec.rb
@@ -75,7 +75,9 @@ describe "Chef::Provider::AptUpdate" do
describe "#action_periodic" do
before do
- allow(File).to receive(:exist?)
+ allow(File).to receive(:exist?).with(config_file).and_return(true)
+ allow(File).to receive(:exist?).with(config_dir).and_return(true)
+ allow(File).to receive(:exist?).with(stamp_dir).and_return(true)
allow(File).to receive(:exist?).with(Dir.tmpdir).and_return(true)
expect(File).to receive(:exist?).with("#{stamp_dir}/update-success-stamp").and_return(true)
end