diff options
author | John Keiser <john@johnkeiser.com> | 2015-06-05 14:01:01 -0700 |
---|---|---|
committer | John Keiser <john@johnkeiser.com> | 2015-06-08 09:01:55 -0700 |
commit | c65de79dbd662d895c8a10ef496d7eb9c69376c2 (patch) | |
tree | c0d171b5e87bd103660369a7497972e695379d1b /spec/unit | |
parent | 01f575ce28a55dcdc7b3945c5f49ebb652a1fff3 (diff) | |
download | chef-c65de79dbd662d895c8a10ef496d7eb9c69376c2.tar.gz |
Overwrite resource_name with provides
Diffstat (limited to 'spec/unit')
-rw-r--r-- | spec/unit/recipe_spec.rb | 4 | ||||
-rw-r--r-- | spec/unit/resource_spec.rb | 14 |
2 files changed, 0 insertions, 18 deletions
diff --git a/spec/unit/recipe_spec.rb b/spec/unit/recipe_spec.rb index 72d5cc6f63..ee98e63c1f 100644 --- a/spec/unit/recipe_spec.rb +++ b/spec/unit/recipe_spec.rb @@ -121,7 +121,6 @@ describe Chef::Recipe do it "locate resource for particular platform" do ShaunTheSheep = Class.new(Chef::Resource) - ShaunTheSheep.use_automatic_resource_name ShaunTheSheep.provides :laughter, :platform => ["television"] node.automatic[:platform] = "television" node.automatic[:platform_version] = "123" @@ -132,7 +131,6 @@ 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") @@ -143,9 +141,7 @@ describe Chef::Recipe do before do node.automatic[:platform] = "nbc_sports" Sounders = Class.new(Chef::Resource) - Sounders.use_automatic_resource_name TottenhamHotspur = Class.new(Chef::Resource) - TottenhamHotspur.use_automatic_resource_name end after do diff --git a/spec/unit/resource_spec.rb b/spec/unit/resource_spec.rb index 1d20fcf604..8ba45d9350 100644 --- a/spec/unit/resource_spec.rb +++ b/spec/unit/resource_spec.rb @@ -395,20 +395,6 @@ describe Chef::Resource do expect(r.resource_name).to eq :blah expect(r.declared_type).to eq :d end - it "use_automatic_resource_name yields a resource name from the class name" do - class SelfResourceNameTestBlahDBlah4 < Chef::Resource - use_automatic_resource_name - end - - c = SelfResourceNameTestBlahDBlah4 - - r = c.new('hi') - r.declared_type = :d - expect(c.resource_name).to eq :self_resource_name_test_blah_d_blah4 - expect(r.resource_name).to eq :self_resource_name_test_blah_d_blah4 - expect(r.declared_type).to eq :d - - end end describe "is" do |