diff options
author | Tim Smith <tsmith@chef.io> | 2018-05-16 12:48:05 -0700 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2018-05-16 12:48:35 -0700 |
commit | f3b34f2ad21934b060a95ac59f1573cea7217124 (patch) | |
tree | 266a6a950c7b2ef08bf93be4da41ab769267cd6f /spec/unit/resource/chef_handler_spec.rb | |
parent | b69877bb0f1b2aec99f9c0a392d064e2b0d21bda (diff) | |
download | chef-f3b34f2ad21934b060a95ac59f1573cea7217124.tar.gz |
Add resource specs round 1test_defaults
Auto generated from the resource inspector
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec/unit/resource/chef_handler_spec.rb')
-rw-r--r-- | spec/unit/resource/chef_handler_spec.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/spec/unit/resource/chef_handler_spec.rb b/spec/unit/resource/chef_handler_spec.rb index 7cba0c7fe3..a6623b8aac 100644 --- a/spec/unit/resource/chef_handler_spec.rb +++ b/spec/unit/resource/chef_handler_spec.rb @@ -25,11 +25,16 @@ describe Chef::Resource::ChefHandler do expect(resource.resource_name).to eql(:chef_handler) end - it "has a default action of enable" do + it "the class_name property is the name_property" do + expect(resource.class_name).to eql("foo") + end + + it "sets the default action as :enable" do expect(resource.action).to eql([:enable]) end - it "the class_name property is the name property" do - expect(resource.class_name).to eql("foo") + it "supports :enable, :disable actions" do + expect { resource.action :enable }.not_to raise_error + expect { resource.action :disable }.not_to raise_error end end |