summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-09-16 13:17:15 -0700
committerTim Smith <tsmith84@gmail.com>2020-09-16 13:17:15 -0700
commit619feaa1a7c7f1b82b7588005db2af2309a91aff (patch)
tree29805a609f6d34467b7a1f2508361be6f54aa001
parentd3670722ec82783b77d1c3d388e5d493f30c9bc2 (diff)
downloadchef-619feaa1a7c7f1b82b7588005db2af2309a91aff.tar.gz
Update the spec for the new behavior
Now that we don't check the value first we're only calling it once, which is :dope: Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--spec/unit/runner_spec.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/spec/unit/runner_spec.rb b/spec/unit/runner_spec.rb
index 0dd8d43136..500ec13f7b 100644
--- a/spec/unit/runner_spec.rb
+++ b/spec/unit/runner_spec.rb
@@ -111,8 +111,7 @@ describe Chef::Runner do
it "should use the provider specified by the resource (if it has one)" do
provider = Chef::Provider::Easy.new(run_context.resource_collection[0], run_context)
- # Expect provider to be called twice, because will fall back to old provider lookup
- expect(run_context.resource_collection[0]).to receive(:provider).twice.and_return(Chef::Provider::Easy)
+ expect(run_context.resource_collection[0]).to receive(:provider).once.and_return(Chef::Provider::Easy)
expect(Chef::Provider::Easy).to receive(:new).once.and_return(provider)
runner.converge
end