Class: ChefSpec::Matchers::IncludeAnyRecipeMatcher

Inherits:
Object
  • Object
show all
Defined in:
lib/chefspec/matchers/include_any_recipe_matcher.rb

Instance Method Summary collapse

Instance Method Details

#descriptionObject



8
9
10
# File 'lib/chefspec/matchers/include_any_recipe_matcher.rb', line 8

def description
  "include any recipe"
end

#failure_messageObject



12
13
14
# File 'lib/chefspec/matchers/include_any_recipe_matcher.rb', line 12

def failure_message
  "expected to include any recipe"
end

#failure_message_when_negatedObject



16
17
18
# File 'lib/chefspec/matchers/include_any_recipe_matcher.rb', line 16

def failure_message_when_negated
  "expected not to include any recipes"
end

#matches?(runner) ⇒ Boolean

Returns:

  • (Boolean)


3
4
5
6
# File 'lib/chefspec/matchers/include_any_recipe_matcher.rb', line 3

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