summaryrefslogtreecommitdiff
path: root/spec/unit/provider/powershell_script_spec.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-06-27 15:38:28 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2016-06-27 15:42:06 -0700
commit86fa507226b484a71a45ef6129840bc3928be6b7 (patch)
treeb6f9efaedd634dbc61418ceb78817b91af1889df /spec/unit/provider/powershell_script_spec.rb
parent945f23be7a43d90ae7ed402d05363b3ff0c11bff (diff)
downloadchef-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.rb8
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