class Spec::Rails::Matchers::IncludeText

:nodoc:

def failure_message

def failure_message
  "expected to find #{expected.inspect} in #{actual.inspect}"
end

def initialize(expected)

def initialize(expected)
  @expected = expected
end

def matches?(response_or_text)

def matches?(response_or_text)
  @actual = response_or_text.respond_to?(:body) ? response_or_text.body : response_or_text
  return actual.include?(expected)
end

def negative_failure_message

def negative_failure_message
  "expected not to include text #{expected.inspect}"
end

def to_s

def to_s
  "include text #{expected.inspect}"
end