sethvargo/chefspec — pull request #298 by geraud (2014-01-03 05:26:06+00:00)
Title: Add virtual recipe support

This patch enables the creation of inlined virtual recipes. It is useful to test definitions.

runner = ChefSpec::Runner.new
runner.define_recipe('cookbook::virtual_recipe') do
mydefinition 'test' do
...
end
end

runner.converge('cookbook::virtual_recipe')

or

runner = ChefSpec::Runner.new
runner.converge_virtual_recipe('cookbook') do
mydefinition 'test' do
...
end
end