class Spec::Rails::Matchers::IncludeText
:nodoc:
def description
def description "include text #{expected.inspect}" end
def failure_message_for_should
def failure_message_for_should "expected to find #{expected.inspect} in #{actual.inspect}" end
def failure_message_for_should_not
def failure_message_for_should_not "expected not to include text #{expected.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