summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/unit/recipe_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/unit/recipe_spec.rb b/spec/unit/recipe_spec.rb
index 5b6f3ea55b..e29ad47045 100644
--- a/spec/unit/recipe_spec.rb
+++ b/spec/unit/recipe_spec.rb
@@ -345,6 +345,17 @@ describe Chef::Recipe do
end
recipe.resources(:zen_master => "lao tzu").something.should eql(false)
end
+
+ it "should return the last statement in the definition as the retval" do
+ crow_define = Chef::ResourceDefinition.new
+ crow_define.define :crow, :peace => false, :something => true do
+ "the return val"
+ end
+ run_context.definitions[:crow] = crow_define
+ recipe.crow "mine" do
+ peace true
+ end.should eql("the return val")
+ end
end
end