Class: BaconExpect::Matcher::Match

Inherits:
SingleMethod show all
Defined in:
lib/bacon-expect/matchers/match.rb

Instance Method Summary collapse

Methods inherited from SingleMethod

#fail!, #matches?

Constructor Details

#initialize(value) ⇒ Match

Returns a new instance of Match.



3
4
5
# File 'lib/bacon-expect/matchers/match.rb', line 3

def initialize(value)
  super(:match, value)
end

Instance Method Details

#fail_message(subject, negated) ⇒ Object



7
8
9
# File 'lib/bacon-expect/matchers/match.rb', line 7

def fail_message(subject, negated)
  FailMessageRenderer.message_for_match(negated, subject, @values.first)
end