Class: MotionSpec::Matcher::Be

Inherits:
SingleMethod show all
Defined in:
lib/motion-spec/matcher/be.rb

Instance Method Summary collapse

Methods inherited from SingleMethod

#fail!, #matches?

Constructor Details

#initialize(value) ⇒ Be

Returns a new instance of Be.



5
6
7
# File 'lib/motion-spec/matcher/be.rb', line 5

def initialize(value)
  super(:equal?, value)
end

Instance Method Details

#fail_message(subject, negated) ⇒ Object



9
10
11
12
13
# File 'lib/motion-spec/matcher/be.rb', line 9

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