Sha256: 1342686ff8d89720cd9afd88450537ac4e476162c68a9120f90b1c3ca33cc2e2

Contents?: true

Size: 280 Bytes

Versions: 33

Compression:

Stored size: 280 Bytes

Contents

# frozen_string_literal: true

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

33 entries across 33 versions & 2 rubygems

Version Path
solidus_backend-2.8.6 spec/support/appear_before_matcher.rb
solidus_backend-2.6.6 spec/support/appear_before_matcher.rb
solidus_backend-2.7.4 spec/support/appear_before_matcher.rb
solidus_backend-2.8.5 spec/support/appear_before_matcher.rb
solidus_backend-2.7.3 spec/support/appear_before_matcher.rb
solidus_backend-2.6.5 spec/support/appear_before_matcher.rb
solidus_backend-2.8.4 spec/support/appear_before_matcher.rb
solidus_backend-2.8.3 spec/support/appear_before_matcher.rb
solidus_backend-2.7.2 spec/support/appear_before_matcher.rb
solidus_backend-2.6.4 spec/support/appear_before_matcher.rb
solidus_backend-2.8.2 spec/support/appear_before_matcher.rb
solidus_backend-2.8.1 spec/support/appear_before_matcher.rb
solidus_backend-2.6.3 spec/support/appear_before_matcher.rb
solidus_backend-2.8.0 spec/support/appear_before_matcher.rb
solidus_backend-2.7.1 spec/support/appear_before_matcher.rb
solidus_backend-2.6.2 spec/support/appear_before_matcher.rb
solidus_backend_devise_token_auth-2.8.0.alpha.14 spec/support/appear_before_matcher.rb
solidus_backend_devise_token_auth-2.8.0.alpha.13 spec/support/appear_before_matcher.rb
solidus_backend_devise_token_auth-2.8.0.alpha.12 spec/support/appear_before_matcher.rb
solidus_backend_devise_token_auth-2.8.0.alpha.11 spec/support/appear_before_matcher.rb