node.recipe? method was removed, but no decent alternative is present. node[:recipes] include only recipes from the run_list, so in order to check for loaded recipes (e.g. by include_recipe) one must revert to using run_state.
Original ticket (
When writing interdependent recipes, it would be good to easily determine if a recipe has been seen, via include_recipe, so behavior can be changed easily depending on the other recipes used.
Currently, this could work:
But that's rather cumbersome. This would be cleaner: