class TextOrder::Matcher

Attributes

actual[R]
expected[R]

Public Class Methods

new(expected) click to toggle source
# File lib/text_order/matcher.rb, line 8
def initialize(expected)
  @expected = expected
end

Public Instance Methods

after(text) click to toggle source
# File lib/text_order/matcher.rb, line 25
def after(text)
  After.new(self, text)
end
before(text) click to toggle source
# File lib/text_order/matcher.rb, line 29
def before(text)
  Before.new(self, text)
end
failure_message() click to toggle source
# File lib/text_order/matcher.rb, line 17
def failure_message
  %{expected "#{actual}" to include the text "#{expected}"}
end
failure_message_when_negated() click to toggle source
# File lib/text_order/matcher.rb, line 21
def failure_message_when_negated
  %{expected "#{actual}" not to include the text "#{expected}"}
end
matches?(actual) click to toggle source
# File lib/text_order/matcher.rb, line 12
def matches?(actual)
  @actual = actual
  actual.include?(expected)
end