summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2017-12-18 18:02:59 -0800
committerTim Smith <tsmith@chef.io>2017-12-18 18:02:59 -0800
commit703e3a06e2962fa7de0b53b0c1db169ef7393dc2 (patch)
tree42b12be7fdaba8a828863a280a224fcc9b5d314c
parent98eee03ef7649475bf0a1fa1dba574732078b391 (diff)
downloadchef-703e3a06e2962fa7de0b53b0c1db169ef7393dc2.tar.gz
Improve the windows_path specs
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--spec/unit/resource/windows_path_spec.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/unit/resource/windows_path_spec.rb b/spec/unit/resource/windows_path_spec.rb
index 754070f262..bde39fec9e 100644
--- a/spec/unit/resource/windows_path_spec.rb
+++ b/spec/unit/resource/windows_path_spec.rb
@@ -21,10 +21,6 @@ require "spec_helper"
describe Chef::Resource::WindowsPath do
let(:resource) { Chef::Resource::WindowsPath.new("some_path") }
- it "returns a Chef::Resource::WindowsPath" do
- expect(resource).to be_a_kind_of(Chef::Resource::WindowsPath)
- end
-
it "sets resource name as :windows_path" do
expect(resource.resource_name).to eql(:windows_path)
end
@@ -36,4 +32,10 @@ describe Chef::Resource::WindowsPath do
it "sets the default action as :add" do
expect(resource.action).to eql(:add)
end
+
+ it "supports :add and :remove actions" do
+ expect { resource.action :add }.not_to raise_error
+ expect { resource.action :remove }.not_to raise_error
+ expect { resource.action :delete }.to raise_error(ArgumentError)
+ end
end