summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2020-10-26 22:45:44 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2020-10-26 23:07:33 -0700
commitc266b5b45eb2f4418780eea86b3f3f8549892472 (patch)
tree3232fff8871dfd2819c44c6193e1d773f1072161
parent45874fecc5010353a5aadf4a0893737ad9282f7b (diff)
downloadchef-c266b5b45eb2f4418780eea86b3f3f8549892472.tar.gz
missing fixes
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r--lib/chef/resource/windows_path.rb10
-rw-r--r--spec/unit/provider/windows_env_spec.rb2
-rw-r--r--spec/unit/provider/windows_path_spec.rb4
3 files changed, 8 insertions, 8 deletions
diff --git a/lib/chef/resource/windows_path.rb b/lib/chef/resource/windows_path.rb
index 427360023c..870ffdef3f 100644
--- a/lib/chef/resource/windows_path.rb
+++ b/lib/chef/resource/windows_path.rb
@@ -56,12 +56,12 @@ class Chef
action_class do
include Chef::Mixin::WindowsEnvHelper if ChefUtils.windows?
- end
- def load_current_resource
- @current_resource = Chef::Resource::WindowsPath.new(new_resource.name)
- @current_resource.path(new_resource.path)
- @current_resource
+ def load_current_resource
+ @current_resource = Chef::Resource::WindowsPath.new(new_resource.name)
+ @current_resource.path(new_resource.path)
+ @current_resource
+ end
end
action :add do
diff --git a/spec/unit/provider/windows_env_spec.rb b/spec/unit/provider/windows_env_spec.rb
index 67c05bc095..7f64622d20 100644
--- a/spec/unit/provider/windows_env_spec.rb
+++ b/spec/unit/provider/windows_env_spec.rb
@@ -321,7 +321,7 @@ describe "windows_env provider", :windows_only do
describe "action_create" do
before do
ENV.delete("CHEF_WINDOWS_ENV_TEST")
- allow(@provider).to receive(:key_exists?).and_return(false)
+ allow(provider).to receive(:key_exists?).and_return(false)
end
it "should update the ruby ENV object when it creates the key" do
diff --git a/spec/unit/provider/windows_path_spec.rb b/spec/unit/provider/windows_path_spec.rb
index 94c4b671bc..0c6c590ece 100644
--- a/spec/unit/provider/windows_path_spec.rb
+++ b/spec/unit/provider/windows_path_spec.rb
@@ -45,7 +45,7 @@ describe "windows_path provider", :windows_only do
describe "#action_add" do
it "uses env resource to add 'path' environment variable" do
allow(provider).to receive(:expand_env_vars)
- expect(provider).to receive(:declare_resource).with(:env, "path")
+ expect(provider).to receive(:declare_resource).with(:env, "path", hash_including)
provider.run_action(:add)
end
end
@@ -53,7 +53,7 @@ describe "windows_path provider", :windows_only do
describe "#action_remove" do
it "uses env resource to remove 'path' environment variable" do
allow(provider).to receive(:expand_env_vars)
- expect(provider).to receive(:declare_resource).with(:env, "path")
+ expect(provider).to receive(:declare_resource).with(:env, "path", hash_including)
provider.run_action(:remove)
end
end