class MotionSpec::Matcher::Include

Public Class Methods

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

Public Instance Methods

fail!(subject, negated) click to toggle source
# File lib/motion-spec/matcher/include.rb, line 12
def fail!(subject, negated)
  fail FailedExpectation.new(
    FailMessageRenderer.message_for_include(negated, subject, @values)
  )
end
matches?(subject) click to toggle source
# File lib/motion-spec/matcher/include.rb, line 8
def matches?(subject)
  @values.all? { |v| subject.include?(v) }
end