Files
grecia/spec/support/matchers/appear_before.rb
2019-09-10 20:02:15 +02:00

7 lines
177 B
Ruby

RSpec::Matchers.define :appear_before do |later_content|
match do |earlier_content|
text = page.text
text.index(earlier_content) < text.index(later_content)
end
end