diff options
author | Gary Ewan Park <gep13@gep13.co.uk> | 2019-06-05 07:57:36 +0100 |
---|---|---|
committer | Gary Ewan Park <gep13@gep13.co.uk> | 2019-06-05 08:04:27 +0100 |
commit | 5a1daf0c5a0899a53ce181834cd851192fb89c7c (patch) | |
tree | 2d0c63e7f8855f28eb4219c488fd06ee2c59f7e3 /spec/unit | |
parent | 1671fe7bbaf122a2d4e13e2d3ac432b916d26a5a (diff) | |
download | chef-5a1daf0c5a0899a53ce181834cd851192fb89c7c.tar.gz |
Address PR review feedback
Signed-off-by: Gary Ewan Park <gep13@gep13.co.uk>
Diffstat (limited to 'spec/unit')
-rw-r--r-- | spec/unit/resource/chocolatey_source_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/unit/resource/chocolatey_source_spec.rb b/spec/unit/resource/chocolatey_source_spec.rb index 455e94c6cb..60bd773594 100644 --- a/spec/unit/resource/chocolatey_source_spec.rb +++ b/spec/unit/resource/chocolatey_source_spec.rb @@ -97,22 +97,22 @@ describe Chef::Resource::ChocolateySource do end describe "#load_current_resource" do - it "sets the source_state to true when the XML disabled property is true" do + it "sets disabled to true when the XML disabled property is true" do allow(current_resource).to receive(:fetch_source_element).with("fakey_fakerton").and_return(OpenStruct.new(disabled: "true")) disable_provider.load_current_resource - expect(current_resource.source_state).to be true + expect(current_resource.disabled).to be true end - it "sets the source_state to false when the XML disabled property is false" do + it "sets disabled to false when the XML disabled property is false" do allow(current_resource).to receive(:fetch_source_element).with("fakey_fakerton").and_return(OpenStruct.new(disabled: "false")) enable_provider.load_current_resource - expect(current_resource.source_state).to be false + expect(current_resource.disabled).to be false end end describe "run_action(:enable)" do it "when source is disabled, it enables it correctly" do - resource.source_state true + resource.disabled true allow(current_resource).to receive(:fetch_source_element).with("fakey_fakerton").and_return(OpenStruct.new(disabled: "true")) expect(enable_provider).to receive(:shell_out!).with("C:\\ProgramData\\chocolatey\\bin\\choco source enable -n \"fakey_fakerton\"") resource.run_action(:enable) @@ -120,7 +120,7 @@ describe Chef::Resource::ChocolateySource do end it "when source is enabled, it is idempotent when trying to enable" do - resource.source_state false + resource.disabled false allow(current_resource).to receive(:fetch_source_element).with("fakey_fakerton").and_return(OpenStruct.new(disabled: "false")) resource.run_action(:enable) expect(resource.updated_by_last_action?).to be false |