summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/chef/resource/windows_path.rb10
-rw-r--r--spec/unit/resource/windows_path_spec.rb2
2 files changed, 2 insertions, 10 deletions
diff --git a/lib/chef/resource/windows_path.rb b/lib/chef/resource/windows_path.rb
index 9274415755..a8a882d4c1 100644
--- a/lib/chef/resource/windows_path.rb
+++ b/lib/chef/resource/windows_path.rb
@@ -24,20 +24,12 @@ class Chef
#
# @since 13.4
class WindowsPath < Chef::Resource
-
+ resource_name :windows_path
provides :windows_path, os: "windows"
allowed_actions :add, :remove
default_action :add
- def initialize(name, run_context = nil)
- super
- @resource_name = :windows_path
- @path = name
- @provider = Chef::Provider::WindowsPath
- @action = :add
- end
-
property :path, String, name_property: true
end
end
diff --git a/spec/unit/resource/windows_path_spec.rb b/spec/unit/resource/windows_path_spec.rb
index bde39fec9e..8f29a11e4e 100644
--- a/spec/unit/resource/windows_path_spec.rb
+++ b/spec/unit/resource/windows_path_spec.rb
@@ -30,7 +30,7 @@ describe Chef::Resource::WindowsPath do
end
it "sets the default action as :add" do
- expect(resource.action).to eql(:add)
+ expect(resource.action).to eql([:add])
end
it "supports :add and :remove actions" do