diff options
author | John Keiser <john@johnkeiser.com> | 2015-05-27 16:04:47 -0700 |
---|---|---|
committer | John Keiser <john@johnkeiser.com> | 2015-06-01 08:02:03 -0700 |
commit | a3aba411ccdf1a0a5f236ed3ce2a678a1892e29b (patch) | |
tree | c6c5a4da0143b4928e076f57941d72a9c2baa1b0 /spec/integration/recipes/recipe_dsl_spec.rb | |
parent | 9f8d3fbb943206c27364593b49b875f7254b77be (diff) | |
download | chef-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.rb | 5 |
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 |