I\'m new to Chef and have been using Test Kitchen to test the validity of my cookbooks, which works great. Now I\'m trying to ensure that environment-specific attributes ar
When coming to validating attributes the part of Test Kitchen your should be using is ChefSpec.
You can define a complete runlist in a spec file and ensure the rendered files are correct.
There's a part of Chefspec documentation about it here.
Another way to do this is to have a "role cookbook", instead of using a role on chef server, you define the attributes you wish to define in an attribute file and make this cookbook depends on what the role runlist would be.
This role cookbook recipe would have include_recipe
only referencing the recipe you would have set in the role runlist.
The main advantage here is that you can include your specs in this cookbook independently of the referenced cookbooks.