From a65147034050361a8b2bf80a54a2532bf9f0413d Mon Sep 17 00:00:00 2001 From: Lamont Granquist Date: Tue, 21 Mar 2017 08:13:47 -0700 Subject: Chef-13: remove method_missing from the DSL Signed-off-by: Lamont Granquist --- spec/unit/recipe_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'spec/unit/recipe_spec.rb') diff --git a/spec/unit/recipe_spec.rb b/spec/unit/recipe_spec.rb index 5ee33b14dd..8e00a82e59 100644 --- a/spec/unit/recipe_spec.rb +++ b/spec/unit/recipe_spec.rb @@ -307,7 +307,7 @@ describe Chef::Recipe do it "gives a sane error message when using method_missing" do expect do recipe.no_such_resource("foo") - end.to raise_error(NoMethodError, %q{No resource or method named `no_such_resource' for `Chef::Recipe "test"'}) + end.to raise_error(NoMethodError, /undefined method `no_such_resource' for #/) end it "gives a sane error message when using method_missing 'bare'" do @@ -316,7 +316,7 @@ describe Chef::Recipe do # Giving an argument will change this from NameError to NoMethodError no_such_resource end - end.to raise_error(NameError, %q{No resource, method, or local variable named `no_such_resource' for `Chef::Recipe "test"'}) + end.to raise_error(NameError, /undefined local variable or method `no_such_resource' for #/) end it "gives a sane error message when using build_resource" do -- cgit v1.2.1