class TextOrder::Before
Public Instance Methods
after(text)
click to toggle source
# File lib/text_order/before.rb, line 17 def after(text) After.new(self, text) end
failure_message()
click to toggle source
Calls superclass method
# File lib/text_order/before.rb, line 9 def failure_message super or %{expected "#{expected}" to appear before "#{text}" in "#{actual}"} end
failure_message_when_negated()
click to toggle source
Calls superclass method
# File lib/text_order/before.rb, line 13 def failure_message_when_negated super or %{expected "#{expected}" not to appear before "#{text}" in "#{actual}"} end
matches?(actual)
click to toggle source
Calls superclass method
# File lib/text_order/before.rb, line 5 def matches?(actual) super and is_before?(actual) end
Private Instance Methods
is_before?(actual)
click to toggle source
# File lib/text_order/before.rb, line 23 def is_before?(actual) actual.index(expected) < actual.index(text) end