diff options
author | Tim Smith <tsmith@chef.io> | 2018-04-27 14:37:35 -0700 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2018-04-27 14:37:35 -0700 |
commit | 6a012bd225aa24d14cca9ee70010a663cf733682 (patch) | |
tree | c5e52a577d48d8c4b0e2190fd7c7daac6977ace6 /spec | |
parent | a068d3cde6105a591da24d1a5ff35bde26c16214 (diff) | |
download | chef-6a012bd225aa24d14cca9ee70010a663cf733682.tar.gz |
Allow build_essential resource to be used without setting a namebuild_name
This is the same as apt_update. It seems odd to use this resource with a name like this:
```ruby
build_essential "build-essential"
```
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/resource/build_essential_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/unit/resource/build_essential_spec.rb b/spec/unit/resource/build_essential_spec.rb index dff94e6bdc..5c25d3e961 100644 --- a/spec/unit/resource/build_essential_spec.rb +++ b/spec/unit/resource/build_essential_spec.rb @@ -28,4 +28,12 @@ describe Chef::Resource::BuildEssential do it "has a default action of install" do expect(resource.action).to eql([:install]) end + + context "when not settting a resource name" do + let(:resource) { Chef::Resource::BuildEssential.new(nil) } + + it "the name defaults to an empty string" do + expect(resource.name).to eql("") + end + end end |