summaryrefslogtreecommitdiff
path: root/spec/integration/recipes/recipe_dsl_spec.rb
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2015-05-27 16:04:47 -0700
committerJohn Keiser <john@johnkeiser.com>2015-06-01 08:02:03 -0700
commita3aba411ccdf1a0a5f236ed3ce2a678a1892e29b (patch)
treec6c5a4da0143b4928e076f57941d72a9c2baa1b0 /spec/integration/recipes/recipe_dsl_spec.rb
parent9f8d3fbb943206c27364593b49b875f7254b77be (diff)
downloadchef-a3aba411ccdf1a0a5f236ed3ce2a678a1892e29b.tar.gz
Move resource_name up to Resource, and figure out its value automatically
Diffstat (limited to 'spec/integration/recipes/recipe_dsl_spec.rb')
-rw-r--r--spec/integration/recipes/recipe_dsl_spec.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/integration/recipes/recipe_dsl_spec.rb b/spec/integration/recipes/recipe_dsl_spec.rb
index 079baaa162..b491f343c5 100644
--- a/spec/integration/recipes/recipe_dsl_spec.rb
+++ b/spec/integration/recipes/recipe_dsl_spec.rb
@@ -9,11 +9,12 @@ describe "Recipe DSL methods" do
class BaseThingy < Chef::Resource
def initialize(*args, &block)
super
- @resource_name = 'base_thingy'
@allowed_actions = [ :create ]
@action = :create
end
+ resource_name 'base_thingy'
+
class<<self
attr_accessor :created_resource
attr_accessor :created_provider
@@ -54,10 +55,10 @@ describe "Recipe DSL methods" do
class Chef::Resource::BackcompatThingy < Chef::Resource
def initialize(*args, &block)
super
- @resource_name = 'backcompat_thingy'
@allowed_actions = [ :create ]
@action = :create
end
+ resource_name 'backcompat_thingy'
end
class Chef::Provider::BackcompatThingy < Chef::Provider
def load_current_resource