diff options
author | danielsdeleo <dan@getchef.com> | 2014-04-09 08:40:25 -0700 |
---|---|---|
committer | danielsdeleo <dan@getchef.com> | 2014-04-09 08:40:25 -0700 |
commit | aebf7ba8d32a29fd4f5105a76aa4e1820f939bb8 (patch) | |
tree | d5159d08ecf47f62496b0b1306fe3513b0535c57 /spec/data | |
parent | 0d7f637b663f53a07ca375d0953658ad283fe6a5 (diff) | |
download | chef-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.rb | 1 | ||||
-rw-r--r-- | spec/data/cookbooks/openldap/recipes/return.rb | 2 |
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 |