class MotionExpect::Matcher::HaveGeneric

Public Class Methods

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

Public Instance Methods

fail!(subject, negated) click to toggle source
# File lib/motion-expect/matcher/have_generic.rb, line 12
def fail!(subject, negated)
  raise FailedExpectation.new(FailMessageRenderer.message_for_have_generic(negated, subject, @method_name, @args))
end
matches?(subject) click to toggle source
# File lib/motion-expect/matcher/have_generic.rb, line 8
def matches?(subject)
  subject.send("has_#{@method_name}?", *@args)
end