diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-06-27 15:38:28 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-06-27 15:42:06 -0700 |
commit | 86fa507226b484a71a45ef6129840bc3928be6b7 (patch) | |
tree | b6f9efaedd634dbc61418ceb78817b91af1889df /spec/unit/provider/powershell_script_spec.rb | |
parent | 945f23be7a43d90ae7ed402d05363b3ff0c11bff (diff) | |
download | chef-86fa507226b484a71a45ef6129840bc3928be6b7.tar.gz |
Attributes v1.1 changeslcg/attributes-v1.1
- fixes *_unless behavior and set_unless_value_present hack from Chef 12
- simplifies rm_* code
- introduces functional read/write/unlink/exist? API
- deprecates method_missing access to attributes for Chef 13
- deprecates set/set_unless aliases for Chef 14
- removes MultiMash mess that I wrote for Chef 13
https://github.com/chef/chef/pull/5029 for more details
Diffstat (limited to 'spec/unit/provider/powershell_script_spec.rb')
-rw-r--r-- | spec/unit/provider/powershell_script_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/unit/provider/powershell_script_spec.rb b/spec/unit/provider/powershell_script_spec.rb index 5b5c783986..96869ff31c 100644 --- a/spec/unit/provider/powershell_script_spec.rb +++ b/spec/unit/provider/powershell_script_spec.rb @@ -43,8 +43,8 @@ describe Chef::Provider::PowershellScript, "action_run" do allow(Chef::Platform).to receive(:windows_nano_server?).and_return(true) allow(provider).to receive(:is_forced_32bit).and_return(false) os_info_double = double("os_info") - allow(provider.run_context.node.kernel).to receive(:os_info).and_return(os_info_double) - allow(os_info_double).to receive(:system_directory).and_return("C:\\Windows\\system32") + allow(provider.run_context.node["kernel"]).to receive(:[]).with("os_info").and_return(os_info_double) + allow(os_info_double).to receive(:[]).with("system_directory").and_return("C:\\Windows\\system32") end it "sets the -Command flag as the last flag" do @@ -58,8 +58,8 @@ describe Chef::Provider::PowershellScript, "action_run" do allow(Chef::Platform).to receive(:windows_nano_server?).and_return(false) allow(provider).to receive(:is_forced_32bit).and_return(false) os_info_double = double("os_info") - allow(provider.run_context.node.kernel).to receive(:os_info).and_return(os_info_double) - allow(os_info_double).to receive(:system_directory).and_return("C:\\Windows\\system32") + allow(provider.run_context.node["kernel"]).to receive(:[]).with("os_info").and_return(os_info_double) + allow(os_info_double).to receive(:[]).with("system_directory").and_return("C:\\Windows\\system32") end it "sets the -File flag as the last flag" do |