summaryrefslogtreecommitdiff
path: root/spec/data
diff options
context:
space:
mode:
authordanielsdeleo <dan@getchef.com>2014-04-09 08:40:25 -0700
committerdanielsdeleo <dan@getchef.com>2014-04-09 08:40:25 -0700
commitaebf7ba8d32a29fd4f5105a76aa4e1820f939bb8 (patch)
treed5159d08ecf47f62496b0b1306fe3513b0535c57 /spec/data
parent0d7f637b663f53a07ca375d0953658ad283fe6a5 (diff)
downloadchef-aebf7ba8d32a29fd4f5105a76aa4e1820f939bb8.tar.gz
Wrap code in an instance_eval context for syntax check.
This evaluates the code in a context similar to what Chef does when compiling recipes, so that idioms like using `return` to end evaluation of a recipe will work.
Diffstat (limited to 'spec/data')
-rw-r--r--spec/data/cookbooks/openldap/recipes/default.rb1
-rw-r--r--spec/data/cookbooks/openldap/recipes/return.rb2
2 files changed, 3 insertions, 0 deletions
diff --git a/spec/data/cookbooks/openldap/recipes/default.rb b/spec/data/cookbooks/openldap/recipes/default.rb
index 0ac8a9bb4b..ba5c9d1507 100644
--- a/spec/data/cookbooks/openldap/recipes/default.rb
+++ b/spec/data/cookbooks/openldap/recipes/default.rb
@@ -1,3 +1,4 @@
+
cat "blanket" do
pretty_kitty true
end
diff --git a/spec/data/cookbooks/openldap/recipes/return.rb b/spec/data/cookbooks/openldap/recipes/return.rb
new file mode 100644
index 0000000000..79bfb5e441
--- /dev/null
+++ b/spec/data/cookbooks/openldap/recipes/return.rb
@@ -0,0 +1,2 @@
+# CHEF-5199 regression test.
+return nil