Module: ChefSpec::API::IncludeAnyRecipe

Defined in:
lib/chefspec/api/include_any_recipe.rb

Instance Method Summary collapse

Instance Method Details

#include_any_recipeChefSpec::Matchers::IncludeAnyRecipeMatcher Also known as: include_any_recipes

Assert that a Chef run includes any recipe.

include_recipe 'apache2::default'

The Examples section demonstrates the different ways to test an include_any_recipe directive with ChefSpec.

Examples:

Assert the Chef run did not include any recipes

expect(chef_run).not_to include_any_recipe

Returns:



18
19
20
# File 'lib/chefspec/api/include_any_recipe.rb', line 18

def include_any_recipe
  ChefSpec::Matchers::IncludeAnyRecipeMatcher.new
end