The default recipe for my cookbook simply includes several other recipes. I know that I can test that the appropriate recipes are included using:
expect(chef_run).to include_recipe 'cookbook::recipe_name
but this doesn't work when I've stubbed the include_recipe call like so
Chef::Recipe.any_instance.stub(:include_recipe).with(anything).and_return(true)
I'm stubbing the include_recipe call as I don't want to have to define all the missing attributes for all of my recipes in this spec.
I would have thought that by stubbing the method to return true
ChefSpec would report it as having run and consider the recipes included but it doesn't. Any ideas?