diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2020-03-31 19:47:10 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2020-03-31 19:47:10 -0700 |
commit | f24948d75a8f0c08d4705e7bc194bfd4b2a3a7d3 (patch) | |
tree | c92bb0168530edf4ec7f5fc62c6e6f5dd68537a7 /spec/unit | |
parent | b2366a11103a53518704b54ab58c5b9b8e45a241 (diff) | |
download | chef-f24948d75a8f0c08d4705e7bc194bfd4b2a3a7d3.tar.gz |
remove duping for load_current_value and code duplicationlcg/after-resource
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec/unit')
-rw-r--r-- | spec/unit/resource/chocolatey_source_spec.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/unit/resource/chocolatey_source_spec.rb b/spec/unit/resource/chocolatey_source_spec.rb index 60bd773594..aad9c4c283 100644 --- a/spec/unit/resource/chocolatey_source_spec.rb +++ b/spec/unit/resource/chocolatey_source_spec.rb @@ -1,5 +1,5 @@ # -# Copyright:: Copyright 2018, Chef Software, Inc. +# Copyright:: Copyright 2018-2020, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -49,9 +49,10 @@ describe Chef::Resource::ChocolateySource do before(:each) do disable_provider # vivify before mocking enable_provider + current_resource allow(resource).to receive(:provider_for_action).and_return(disable_provider) allow(resource).to receive(:provider_for_action).and_return(enable_provider) - allow(resource).to receive(:dup).and_return(current_resource) + allow(resource.class).to receive(:new).and_return(current_resource) @original_env = ENV.to_hash ENV["ALLUSERSPROFILE"] = 'C:\ProgramData' end |