class MotionExpect::Matcher::SingleMethod

Public Class Methods

new(method_name, *values) click to toggle source
# File lib/motion-expect/matcher/single_method.rb, line 4
def initialize(method_name, *values)
  @values = values
  @method_name = method_name
end

Public Instance Methods

fail!(subject, negated) click to toggle source
# File lib/motion-expect/matcher/single_method.rb, line 13
def fail!(subject, negated)
  raise FailedExpectation.new(self.fail_message(subject, negated))
end
fail_message(subject, negated = false) click to toggle source
# File lib/motion-expect/matcher/single_method.rb, line 17
def fail_message(subject, negated = false)
  FailMessageRenderer.message_for_be(negated, subject, @method_name, @values)
end
matches?(subject) click to toggle source
# File lib/motion-expect/matcher/single_method.rb, line 9
def matches?(subject)
  subject.send(@method_name, *@values)
end