class TextOrder::After

Public Instance Methods

before(text) click to toggle source
# File lib/text_order/after.rb, line 17
def before(text)
  Before.new(self, text)
end
failure_message() click to toggle source
Calls superclass method
# File lib/text_order/after.rb, line 9
def failure_message
  super or %{expected "#{expected}" to appear after "#{text}" in "#{actual}"}
end
failure_message_when_negated() click to toggle source
Calls superclass method
# File lib/text_order/after.rb, line 13
def failure_message_when_negated
  super or %{expected "#{expected}" not to appear after "#{text}" in "#{actual}"}
end
matches?(actual) click to toggle source
Calls superclass method
# File lib/text_order/after.rb, line 5
def matches?(actual)
  super and is_after?(actual)
end

Private Instance Methods

is_after?(actual) click to toggle source
# File lib/text_order/after.rb, line 23
def is_after?(actual)
  actual.index(expected) > actual.index(text)
end