diff options
author | danielsdeleo <dan@opscode.com> | 2014-02-07 08:46:06 -0800 |
---|---|---|
committer | danielsdeleo <dan@opscode.com> | 2014-02-07 10:53:07 -0800 |
commit | eeae85b44267c4147ed38f19ef8c4c5d30919198 (patch) | |
tree | a05a3ec70af80f9ae06b1c2822257b1c9b10213b /spec | |
parent | cfca4a26fde79b209542930405026aef1a5a16bb (diff) | |
download | chef-eeae85b44267c4147ed38f19ef8c4c5d30919198.tar.gz |
Localize rescues in Recipe method_missing DSL
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/recipe_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/unit/recipe_spec.rb b/spec/unit/recipe_spec.rb index 612eae2b8e..6bea1457f9 100644 --- a/spec/unit/recipe_spec.rb +++ b/spec/unit/recipe_spec.rb @@ -202,6 +202,19 @@ describe Chef::Recipe do end + describe "when creating a resource that contains an error in the attributes block" do + + it "does not obfuscate the error source" do + lambda do + @recipe.zen_master("klopp") do + this_method_doesnt_exist + end + end.should raise_error(NoMethodError, "undefined method `this_method_doesnt_exist' for Chef::Resource::ZenMaster") + + end + + end + describe "resource definitions" do it "should execute defined resources" do crow_define = Chef::ResourceDefinition.new |