summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2015-04-28 16:48:57 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2015-05-01 11:09:49 -0700
commita5f5748653d0ffd90292be2aabfea7783be12f2b (patch)
tree19370e183066aa15085c466289a1b9860c6e4ed4
parent4100e8e9b75e1175b8efee04913ab6fb045bd3e8 (diff)
downloadchef-a5f5748653d0ffd90292be2aabfea7783be12f2b.tar.gz
fix specs
-rw-r--r--spec/support/shared/unit/provider/file.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/support/shared/unit/provider/file.rb b/spec/support/shared/unit/provider/file.rb
index 86f32c9e89..7e0213b316 100644
--- a/spec/support/shared/unit/provider/file.rb
+++ b/spec/support/shared/unit/provider/file.rb
@@ -529,9 +529,10 @@ shared_examples_for Chef::Provider::File do
:for_reporting => diff_for_reporting )
allow(diff).to receive(:diff).with(resource_path, tempfile_path).and_return(true)
expect(provider).to receive(:diff).at_least(:once).and_return(diff)
- expect(provider).to receive(:managing_content?).at_least(:once).and_return(true)
expect(provider).to receive(:checksum).with(tempfile_path).and_return(tempfile_sha256)
- expect(provider).to receive(:checksum).with(resource_path).and_return(tempfile_sha256)
+ allow(provider).to receive(:managing_content?).and_return(true)
+ allow(provider).to receive(:checksum).with(resource_path).and_return(tempfile_sha256)
+ expect(resource).not_to receive(:checksum) # do not mutate the new resource
expect(provider.deployment_strategy).to receive(:deploy).with(tempfile_path, normalized_path)
end
context "when the file was created" do