diff options
author | Nolan Davidson <nolan.davidson@gmail.com> | 2014-09-11 10:58:21 -0400 |
---|---|---|
committer | Nolan Davidson <nolan.davidson@gmail.com> | 2014-09-11 11:10:45 -0400 |
commit | 96b3a203c064373f7b71598da3e75c1c71fa3b18 (patch) | |
tree | 8b9a611264b8aba5de5ad94945d654c7ba85f264 /spec/unit/recipe_spec.rb | |
parent | de47c1d65ffc7dc52a6d63a3b415dd23bdda31ae (diff) | |
download | chef-96b3a203c064373f7b71598da3e75c1c71fa3b18.tar.gz |
Added exec method to Recipe, addressing Issue 1689
Diffstat (limited to 'spec/unit/recipe_spec.rb')
-rw-r--r-- | spec/unit/recipe_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/unit/recipe_spec.rb b/spec/unit/recipe_spec.rb index c795ba3788..572708f375 100644 --- a/spec/unit/recipe_spec.rb +++ b/spec/unit/recipe_spec.rb @@ -361,6 +361,15 @@ describe Chef::Recipe do end end + describe "handle exec calls" do + it "should raise NoSuchResourceType error if exec is used" do + code = <<-CODE + exec 'do_not_try_to_exec' + CODE + lambda { recipe.instance_eval(code) }.should raise_error(Chef::Exceptions::NoSuchResourceType) + end + end + describe "from_file" do it "should load a resource from a ruby file" do recipe.from_file(File.join(CHEF_SPEC_DATA, "recipes", "test.rb")) |