Thursday, 15 August 2013

Why can't chefspec find the chef_handler cookbook?

Why can't chefspec find the chef_handler cookbook?

in trying to write chefspec tests, following the examples on the chefspec
README (https://github.com/acrmp/chefspec), I get the following error. I
tried adding "depends 'chef_handler'" to my metadata.rb, without success:
$ bundle exec rspec [2013-08-15T11:55:01-07:00] WARN: found a directory
cookbooks in the cookbook path, but it contains no cookbook files.
skipping. F
Pending: example::default should include # Your recipe examples go here. #
./spec/default_spec.rb:6 example::single_node should do something # Your
recipe examples go here. # ./spec/single_node_spec.rb:5
Failures:
1) example::default logs the foo attribute Failure/Error:
chef_run.converge 'example::default' Chef::Exceptions::CookbookNotFound:
Cookbook chef_handler not found. If you're loading chef_handler from
another cookbook, make sure you configure the dependency in your metadata
# ./spec/default_spec.rb:16:in `block (2 levels) in '

No comments:

Post a Comment