Exception: Contr::Matcher::RulesNotMatched

Inherits:
StandardError
  • Object
show all
Defined in:
lib/contr/matcher.rb

Direct Known Subclasses

ExpectationsNotMatched, GuaranteesNotMatched

Instance Method Summary collapse

Constructor Details

#initialize(failed_rules, args) ⇒ RulesNotMatched

Returns a new instance of RulesNotMatched.



9
10
11
12
# File 'lib/contr/matcher.rb', line 9

def initialize(failed_rules, args)
  @failed_rules_minimized = failed_rules.map(&:values)
  @args = args
end

Instance Method Details

#messageObject



14
15
16
# File 'lib/contr/matcher.rb', line 14

def message
  "failed rules: #{@failed_rules_minimized.inspect}, args: #{@args.inspect}"
end