Ohai, Chefs,
I have been trying to use a test-driven development method for baking Chef recipes and have been having good success with chefspec and minitest-chef-handler. However, one area that currently is difficult to test are templates.
I am looking for a way to get the output of erb templates, correctly substituting in node attributes (e.g. have a <%= node[:something] %> and want to get it to substitute correctly). So far, I haven't found a solution.
I was wondering if anyone has a solution to this?
Otherwise, I am considering working on one, perhaps using Fauxhai to mock for node attribute substitution.
Thanks a lot,
Carlton