So I am trying to Chefspec some branching logic in a baseline cookbook.
The recipe chef-client::delete_validation is throwing up an exception on
line 28 where it checks for the existence of Chef::Config[:client_key] (
I get several errors like so:
- mu-baseline::default On Centos 6.4 as a VMWare guest does include
no implicit conversion of nil into String
exists?' # /tmp/d20140430-13074-1bq5osr/cookbooks/chef-client/recipes/delete_validation.rb:28:inblock (2 levels) in from_file’
block (3 levels) in <top (required)>' # ./spec/default_spec.rb:48:inblock (4 levels) in <top (required)>’
If I just remove
include_recipe 'chef-client::delete_validation' those
test(s) pass. Is there a way I can filter that recipe’s evaluation, or
something I can stub, to get past this exception?