Sha256: 0821daf7d0d216e11788e3d5991ab82866cbbd65496423b59ae6b1fc8ca906e2

Contents?: true

Size: 249 Bytes

Versions: 81

Compression:

Stored size: 249 Bytes

Contents

require 'rspec/expectations'

RSpec::Matchers.define :appear_before do |expected|
  match do |actual|
    raise "Page instance required to use the appear_before matcher" unless page
    page.body.index(actual) <= page.body.index(expected)
  end
end

Version data entries

81 entries across 81 versions & 2 rubygems

Version Path
solidus_backend-2.5.2 spec/support/appear_before_matcher.rb
solidus_backend-2.5.1 spec/support/appear_before_matcher.rb
solidus_backend-2.5.0 spec/support/appear_before_matcher.rb
solidus_backend-2.5.0.rc1 spec/support/appear_before_matcher.rb
solidus_backend-2.5.0.beta2 spec/support/appear_before_matcher.rb
solidus_backend-2.5.0.beta1 spec/support/appear_before_matcher.rb
solidus_backend-2.4.2 spec/support/appear_before_matcher.rb
solidus_backend-2.4.1 spec/support/appear_before_matcher.rb
solidus_backend-2.3.1 spec/support/appear_before_matcher.rb
solidus_backend-2.2.2 spec/support/appear_before_matcher.rb
solidus_backend-2.1.1 spec/support/appear_before_matcher.rb
solidus_backend-2.0.3 spec/support/appear_before_matcher.rb
solidus_backend-1.4.2 spec/support/appear_before_matcher.rb
solidus_backend-1.3.2 spec/support/appear_before_matcher.rb
solidus_backend-1.2.3 spec/support/appear_before_matcher.rb
solidus_backend-1.1.4 spec/support/appear_before_matcher.rb
solidus_backend-1.0.7 spec/support/appear_before_matcher.rb
solidus_backend-2.4.0 spec/support/appear_before_matcher.rb
solidus_backend-2.4.0.rc1 spec/support/appear_before_matcher.rb
solidus_backend-2.4.0.beta1 spec/support/appear_before_matcher.rb