Skip to content

Commit

Permalink
Removed after_created and added test to recipe_spec
Browse files Browse the repository at this point in the history
  • Loading branch information
nsdavidson authored and btm committed Mar 27, 2015
1 parent 551ec22 commit 702af11
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 0 additions & 4 deletions lib/chef/resource/remote_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,6 @@ def headers(args=nil)
)
end

def after_created
validate_source(@source)
end

private

def validate_source(source)
Expand Down
9 changes: 9 additions & 0 deletions spec/unit/recipe_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,17 @@ def expect_warning
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
Expand Down

0 comments on commit 702af11

Please sign in to comment.