在尝试编写 chefspec 测试时,按照 chefspec README ( https://github.com/acrmp/chefspec ) 上的示例,我收到以下错误。我尝试将“depends 'chef_handler'”添加到我的 metadata.rb 中,但没有成功:
$ 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 <top (required)>'