Sha256: 987e8b3488e2998118e8ccde94400d0774f5a4578574f441cd79c27b7a2b7711

Contents?: true

Size: 595 Bytes

Versions: 9

Compression:

Stored size: 595 Bytes

Contents

# frozen_string_literal: true

require 'capybara/rspec/matchers/base'

module Capybara
  module RSpecMatchers
    module Matchers
      class HaveCurrentPath < WrappedElementMatcher
        def element_matches?(el)
          el.assert_current_path(current_path, **@kw_args)
        end

        def element_does_not_match?(el)
          el.assert_no_current_path(current_path, **@kw_args)
        end

        def description
          "have current path #{current_path.inspect}"
        end

      private

        def current_path
          @args.first
        end
      end
    end
  end
end

Version data entries

9 entries across 8 versions & 2 rubygems

Version Path
tdiary-5.1.3 vendor/bundle/ruby/2.6.0/gems/capybara-3.32.2/lib/capybara/rspec/matchers/have_current_path.rb
tdiary-5.1.3 vendor/bundle/ruby/2.7.0/gems/capybara-3.33.0/lib/capybara/rspec/matchers/have_current_path.rb
capybara-3.33.0 lib/capybara/rspec/matchers/have_current_path.rb
tdiary-5.1.2 vendor/bundle/ruby/2.7.0/gems/capybara-3.32.2/lib/capybara/rspec/matchers/have_current_path.rb
capybara-3.32.2 lib/capybara/rspec/matchers/have_current_path.rb
capybara-3.32.1 lib/capybara/rspec/matchers/have_current_path.rb
capybara-3.32.0 lib/capybara/rspec/matchers/have_current_path.rb
tdiary-5.1.1 vendor/bundle/ruby/2.7.0/gems/capybara-3.31.0/lib/capybara/rspec/matchers/have_current_path.rb
capybara-3.31.0 lib/capybara/rspec/matchers/have_current_path.rb