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/integration | |
parent | 5998cc7315507e649bb76f139c07715f6e590707 (diff) | |
download | chef-46e3f2258b1b04ca6030b5ef1575adadaa920e08.tar.gz |
Add use_automatic_resource_name
Diffstat (limited to 'spec/integration')
-rw-r--r-- | spec/integration/recipes/recipe_dsl_spec.rb | 2 | ||||
-rw-r--r-- | spec/integration/recipes/resource_definition_spec.rb | 9 |
2 files changed, 4 insertions, 7 deletions
diff --git a/spec/integration/recipes/recipe_dsl_spec.rb b/spec/integration/recipes/recipe_dsl_spec.rb index 3d31b87ffb..c79c20cd7d 100644 --- a/spec/integration/recipes/recipe_dsl_spec.rb +++ b/spec/integration/recipes/recipe_dsl_spec.rb @@ -58,7 +58,6 @@ describe "Recipe DSL methods" do @allowed_actions = [ :create ] @action = :create end - resource_name 'backcompat_thingy' end class Chef::Provider::BackcompatThingy < Chef::Provider def load_current_resource @@ -84,6 +83,7 @@ describe "Recipe DSL methods" do before(:context) { class RecipeDSLSpecNamespace::BackcompatThingy < BaseThingy + provides :backcompat_thingy resource_name :backcompat_thingy end diff --git a/spec/integration/recipes/resource_definition_spec.rb b/spec/integration/recipes/resource_definition_spec.rb index da92bb18fa..4e5bc53428 100644 --- a/spec/integration/recipes/resource_definition_spec.rb +++ b/spec/integration/recipes/resource_definition_spec.rb @@ -3,13 +3,10 @@ require 'support/shared/integration/integration_helper' describe "Resource definition" do include IntegrationSupport - context "With a resource with no resource_name or provides line" do - before do - Chef::Config[:treat_deprecation_warnings_as_errors] = false - end - + context "With a resource with only provides lines and no resource_name" do before(:context) { - class Chef::Resource::ResourceDefinitionNoNameTest < Chef::Resource + class ResourceDefinitionNoNameTest < Chef::Resource + provides :resource_definition_no_name_test end } it "Creating said resource with the resource builder fails with an exception" do |