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/git_spec.rb | |
parent | b69877bb0f1b2aec99f9c0a392d064e2b0d21bda (diff) | |
download | chef-test_defaults.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/git_spec.rb')
-rw-r--r-- | spec/unit/resource/git_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/unit/resource/git_spec.rb b/spec/unit/resource/git_spec.rb index 1883595617..70b7e8ae8b 100644 --- a/spec/unit/resource/git_spec.rb +++ b/spec/unit/resource/git_spec.rb @@ -44,4 +44,20 @@ describe Chef::Resource::Git do expect(resource.revision).to eql("v1.0 tag") end + it "the destination property is the name_property" do + expect(resource.destination).to eql("my awesome webapp") + end + + it "sets the default action as :sync" do + expect(resource.action).to eql([:sync]) + end + + it "supports :sync, :checkout, :export, :diff, :log actions" do + expect { resource.action :sync }.not_to raise_error + expect { resource.action :checkout }.not_to raise_error + expect { resource.action :export }.not_to raise_error + expect { resource.action :diff }.not_to raise_error + expect { resource.action :log }.not_to raise_error + end + end |