summaryrefslogtreecommitdiff
path: root/spec/integration/recipes
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2017-03-21 08:13:47 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2017-03-21 08:13:47 -0700
commita65147034050361a8b2bf80a54a2532bf9f0413d (patch)
treefeb2dbd85edca4c3e1d8d1f555422ed1f7852e53 /spec/integration/recipes
parentb39d1b2937d7f6b2b974531f99b60e7b5d026fc7 (diff)
downloadchef-a65147034050361a8b2bf80a54a2532bf9f0413d.tar.gz
Chef-13: remove method_missing from the DSL
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec/integration/recipes')
-rw-r--r--spec/integration/recipes/recipe_dsl_spec.rb29
1 files changed, 0 insertions, 29 deletions
diff --git a/spec/integration/recipes/recipe_dsl_spec.rb b/spec/integration/recipes/recipe_dsl_spec.rb
index 27176f65d8..bc99dddaf3 100644
--- a/spec/integration/recipes/recipe_dsl_spec.rb
+++ b/spec/integration/recipes/recipe_dsl_spec.rb
@@ -1174,35 +1174,6 @@ describe "Recipe DSL methods" do
end
end
- context "with provides? returning true to blarghle_blarghle_little_star and not resource_name" do
- before do
- temp_blarghle_blarghle_little_star = blarghle_blarghle_little_star
- resource_class.define_singleton_method(:provides?) do |node, resource_name|
- @called_provides = true
- resource_name == temp_blarghle_blarghle_little_star
- end
- end
-
- it "my_resource does not return the resource" do
- dsl_name = my_resource
- expect_converge do
- instance_eval("#{dsl_name} 'foo'")
- end.to raise_error(Chef::Exceptions::NoSuchResourceType)
- expect(resource_class.called_provides).to be_truthy
- end
-
- it "blarghle_blarghle_little_star 'foo' returns the resource and emits a warning" do
- Chef::Config[:treat_deprecation_warnings_as_errors] = false
- dsl_name = blarghle_blarghle_little_star
- recipe = converge do
- instance_eval("#{dsl_name} 'foo'")
- end
- expect(recipe.logged_warnings).to include "WARN: #{resource_class}.provides? returned true when asked if it provides DSL #{dsl_name}, but provides :#{dsl_name} was never called!"
- expect(BaseThingy.created_resource).to eq resource_class
- expect(resource_class.called_provides).to be_truthy
- end
- end
-
context "and a provider" do
let(:provider_class) do
Class.new(BaseThingy::Provider) do