diff options
author | John Keiser <john@johnkeiser.com> | 2015-05-28 11:32:10 -0700 |
---|---|---|
committer | John Keiser <john@johnkeiser.com> | 2015-06-01 08:02:05 -0700 |
commit | 46e3f2258b1b04ca6030b5ef1575adadaa920e08 (patch) | |
tree | f59066b287aee399b923de9346be4a42f4e20924 /spec/unit/recipe_spec.rb | |
parent | 5998cc7315507e649bb76f139c07715f6e590707 (diff) | |
download | chef-46e3f2258b1b04ca6030b5ef1575adadaa920e08.tar.gz |
Add use_automatic_resource_name
Diffstat (limited to 'spec/unit/recipe_spec.rb')
-rw-r--r-- | spec/unit/recipe_spec.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/unit/recipe_spec.rb b/spec/unit/recipe_spec.rb index 9c4fb49497..59d05298c3 100644 --- a/spec/unit/recipe_spec.rb +++ b/spec/unit/recipe_spec.rb @@ -121,6 +121,7 @@ describe Chef::Recipe do it "locate resource for particular platform" do ShaunTheSheep = Class.new(Chef::Resource) + ShaunTheSheep.use_automatic_resource_name ShaunTheSheep.provides :laughter, :on_platforms => ["television"] node.automatic[:platform] = "television" node.automatic[:platform_version] = "123" @@ -131,6 +132,7 @@ describe Chef::Recipe do it "locate a resource for all platforms" do YourMom = Class.new(Chef::Resource) + YourMom.use_automatic_resource_name YourMom.provides :love_and_caring res = recipe.love_and_caring "mommy" expect(res.name).to eql("mommy") @@ -141,8 +143,10 @@ describe Chef::Recipe do before do node.automatic[:platform] = "nbc_sports" Sounders = Class.new(Chef::Resource) + Sounders.use_automatic_resource_name Sounders.provides :football, platform: "nbc_sports" TottenhamHotspur = Class.new(Chef::Resource) + TottenhamHotspur.use_automatic_resource_name TottenhamHotspur.provides :football, platform: "nbc_sports" end |