diff options
author | Nolan Davidson <nolan.davidson@gmail.com> | 2014-12-18 11:34:17 -0500 |
---|---|---|
committer | Bryan McLellan <btm@chef.io> | 2015-03-27 08:52:32 -0400 |
commit | 702af11fcd38cb8d769f30e9cb5f4bf8dd667e21 (patch) | |
tree | 38835d15184a6c29b47ad3449db700000fd463e9 | |
parent | 551ec22e7b8fe240a111f7124d820ff64299283f (diff) | |
download | chef-702af11fcd38cb8d769f30e9cb5f4bf8dd667e21.tar.gz |
Removed after_created and added test to recipe_spec
-rw-r--r-- | lib/chef/resource/remote_file.rb | 4 | ||||
-rw-r--r-- | spec/unit/recipe_spec.rb | 9 |
2 files changed, 9 insertions, 4 deletions
diff --git a/lib/chef/resource/remote_file.rb b/lib/chef/resource/remote_file.rb index 7ba98b9d3b..e56f69941d 100644 --- a/lib/chef/resource/remote_file.rb +++ b/lib/chef/resource/remote_file.rb @@ -125,10 +125,6 @@ class Chef ) end - def after_created - validate_source(@source) - end - private def validate_source(source) diff --git a/spec/unit/recipe_spec.rb b/spec/unit/recipe_spec.rb index e1604483f3..b370e12732 100644 --- a/spec/unit/recipe_spec.rb +++ b/spec/unit/recipe_spec.rb @@ -237,8 +237,17 @@ describe Chef::Recipe do action :nothing end end + + it "validating resources via build_resource" do + expect {recipe.build_resource(:remote_file, "klopp") do + source Chef::DelayedEvaluator.new {"http://chef.io"} + end}.to_not raise_error + end + end + + describe "creating resources via declare_resource" do let(:zm_resource) do recipe.declare_resource(:zen_master, "klopp") do |