diff options
author | John Keiser <john@johnkeiser.com> | 2015-06-16 13:49:26 -0700 |
---|---|---|
committer | John Keiser <john@johnkeiser.com> | 2015-06-16 16:57:07 -0700 |
commit | 6fbe77bf0c3fa2f4683487fac87f79b1eb6c293e (patch) | |
tree | 670157649ee8529602ff7845c43d785647fca2d7 /spec/unit/recipe_spec.rb | |
parent | 7f81d08720d59df974ec4d5416fd24fafc2ad824 (diff) | |
download | chef-6fbe77bf0c3fa2f4683487fac87f79b1eb6c293e.tar.gz |
Only automatically set resources that do class X < Chef::Resource,jk/3524
not X = Class.new(Chef::Resource)
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 ee98e63c1f..7579abf227 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.resource_name :shaun_the_sheep ShaunTheSheep.provides :laughter, :platform => ["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.resource_name :your_mom YourMom.provides :love_and_caring res = recipe.love_and_caring "mommy" expect(res.name).to eql("mommy") @@ -141,7 +143,9 @@ describe Chef::Recipe do before do node.automatic[:platform] = "nbc_sports" Sounders = Class.new(Chef::Resource) + Sounders.resource_name :sounders TottenhamHotspur = Class.new(Chef::Resource) + TottenhamHotspur.resource_name :tottenham_hotspur end after do |