I' am trying to write ChefSpec tests for some of our Cookbooks. One of those is including a lot of other cookbooks, to setup an Jenkins CI Enviroment.
Iam wondering how other people are testing the included recepies. My "_spec.rb" looks like this in the moment (example to test, that jenkins master is included):
it 'includes the `jenkins` recipe' do
expect(chef_run).to include_recipe('jenkins::master')
end
Now the coverage goes down, because i am not testing the included cookbooks (they have there own chefspec tests).
If someone has an example or good ideas... would be great.
Ok found an Issu, looks like this is my "problem" with the CodeCoverage - iam on Windows: https://github.com/sethvargo/chefspec/issues/594
.. same issue under Ubuntu, no OSX to verify the issue (-: