class ChefSpec::Matchers::IncludeAnyRecipeMatcher

def description

def description
  "include any recipe"
end

def failure_message

def failure_message
  "expected to include any recipe"
end

def failure_message_when_negated

def failure_message_when_negated
  "expected not to include any recipes"
end

def loaded_recipes

Returns:
  • (Array) -
def loaded_recipes
  @runner.run_context.loaded_recipes.map { |name| with_default(name) }
end

def matches?(runner)

def matches?(runner)
  @runner = runner
  !(loaded_recipes - run_list_recipes).empty?
end

def run_list_recipes

Returns:
  • (Array) -
def run_list_recipes
  @runner.run_context.node.run_list.run_list_items.map { |x| with_default(x.name) }
end

def with_default(name)

Returns:
  • (String) -

Parameters:
  • name (String) --
def with_default(name)
  name.include?("::") ? name : "#{name}::default"
end