Sha256: 5ba92e93708281c2201abe521e4ecfceb1fa821b44d068ecc231cfb026ebe000

Contents?: true

Size: 413 Bytes

Versions: 21

Compression:

Stored size: 413 Bytes

Contents

# frozen_string_literal: true

RSpec::Matchers.define :appear_before do |later_content|
  match do |earlier_content|
    begin
      page.body.index(earlier_content) < page.body.index(later_content)
    rescue ArgumentError
      raise "Could not locate later content on page: #{later_content}"
    rescue NoMethodError
      raise "Could not locate earlier content on page: #{earlier_content}"
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
decidim-dev-0.16.1 lib/decidim/dev/test/rspec_support/orderly_matchers.rb
decidim-dev-0.16.0 lib/decidim/dev/test/rspec_support/orderly_matchers.rb
decidim-dev-0.15.2 lib/decidim/dev/test/rspec_support/orderly_matchers.rb
decidim-dev-0.15.1 lib/decidim/dev/test/rspec_support/orderly_matchers.rb
decidim-dev-0.15.0 lib/decidim/dev/test/rspec_support/orderly_matchers.rb
decidim-dev-0.14.4 lib/decidim/dev/test/rspec_support/orderly_matchers.rb
decidim-dev-0.14.3 lib/decidim/dev/test/rspec_support/orderly_matchers.rb
decidim-dev-0.14.2 lib/decidim/dev/test/rspec_support/orderly_matchers.rb
decidim-dev-0.14.1 lib/decidim/dev/test/rspec_support/orderly_matchers.rb
decidim-dev-0.13.1 lib/decidim/dev/test/rspec_support/orderly_matchers.rb
decidim-dev-0.12.2 lib/decidim/dev/test/rspec_support/orderly_matchers.rb
decidim-dev-0.13.0 lib/decidim/dev/test/rspec_support/orderly_matchers.rb
decidim-dev-0.12.1 lib/decidim/dev/test/rspec_support/orderly_matchers.rb
decidim-dev-0.13.0.pre1 lib/decidim/dev/test/rspec_support/orderly_matchers.rb
decidim-dev-0.12.0 lib/decidim/dev/test/rspec_support/orderly_matchers.rb
decidim-dev-0.11.2 lib/decidim/dev/test/rspec_support/orderly_matchers.rb
decidim-dev-0.12.0.pre lib/decidim/dev/test/rspec_support/orderly_matchers.rb
decidim-dev-0.11.1 lib/decidim/dev/test/rspec_support/orderly_matchers.rb
decidim-dev-0.11.0.pre1 lib/decidim/dev/test/rspec_support/orderly_matchers.rb
decidim-dev-0.10.1 lib/decidim/dev/test/rspec_support/orderly_matchers.rb