class MotionExpect::Matcher::Include
Public Class Methods
new(*values)
click to toggle source
# File lib/motion-expect/matcher/include.rb, line 3 def initialize(*values) @values = *values end
Public Instance Methods
fail!(subject, negated)
click to toggle source
# File lib/motion-expect/matcher/include.rb, line 11 def fail!(subject, negated) raise FailedExpectation.new(FailMessageRenderer.message_for_include(negated, subject, @values)) end
matches?(subject)
click to toggle source
# File lib/motion-expect/matcher/include.rb, line 7 def matches?(subject) @values.all?{|v| subject.include?(v)} end