Unit Testing Chef Cookbooks

1 · Seth Vargo · Jan. 13, 2013, midnight
Okay, now that I'm done ranting about how to Unit test, let's move onto Chef. I spoke at Chef Summit a few months ago and received a lot of questions about ChefSpec. It's very difficult to demonstrate the value in a Unit test when everyone is thinking at a higher level (acceptance testing). Let's say I have a simple cookbook that just installs apache: package value_for_platform( %w(centos redhat suse fedora) => { 'default' => 'httpd' }, %w(ubuntu debian) => { 'default' => 'apache...