Sha256: 39e9db91dbef83e3c4bf741b55edc74c49b272dd8f4dc28a3658f7aebce4b7ef

Contents?: true

Size: 631 Bytes

Versions: 64

Compression:

Stored size: 631 Bytes

Contents

# frozen_string_literal: true

require 'capybara/rspec/matchers/have_selector'

module Capybara
  module RSpecMatchers
    module Matchers
      class MatchSelector < HaveSelector
        def element_matches?(el)
          el.assert_matches_selector(*@args, &@filter_block)
        end

        def element_does_not_match?(el)
          el.assert_not_matches_selector(*@args, &@filter_block)
        end

        def description
          "match #{query.description}"
        end

        def query
          @query ||= Capybara::Queries::MatchQuery.new(*session_query_args, &@filter_block)
        end
      end
    end
  end
end

Version data entries

64 entries across 64 versions & 4 rubygems

Version Path
isomorfeus-puppetmaster-0.5.7 lib/isomorfeus/puppetmaster/rspec/matchers/match_selector.rb
isomorfeus-puppetmaster-0.5.6 lib/isomorfeus/puppetmaster/rspec/matchers/match_selector.rb
isomorfeus-puppetmaster-0.5.5 lib/isomorfeus/puppetmaster/rspec/matchers/match_selector.rb
isomorfeus-puppetmaster-0.5.4 lib/isomorfeus/puppetmaster/rspec/matchers/match_selector.rb
isomorfeus-puppetmaster-0.5.3 lib/isomorfeus/puppetmaster/rspec/matchers/match_selector.rb
isomorfeus-puppetmaster-0.5.2 lib/isomorfeus/puppetmaster/rspec/matchers/match_selector.rb
isomorfeus-puppetmaster-0.5.1 lib/isomorfeus/puppetmaster/rspec/matchers/match_selector.rb
isomorfeus-puppetmaster-0.5.0 lib/isomorfeus/puppetmaster/rspec/matchers/match_selector.rb
isomorfeus-puppetmaster-0.4.1 lib/isomorfeus/puppetmaster/rspec/matchers/match_selector.rb
isomorfeus-puppetmaster-0.4.0 lib/isomorfeus/puppetmaster/rspec/matchers/match_selector.rb
tdiary-5.1.2 vendor/bundle/ruby/2.6.0/gems/capybara-3.29.0/lib/capybara/rspec/matchers/match_selector.rb
tdiary-5.1.1 vendor/bundle/ruby/2.6.0/gems/capybara-3.29.0/lib/capybara/rspec/matchers/match_selector.rb
isomorfeus-puppetmaster-0.3.5 lib/isomorfeus/puppetmaster/rspec/matchers/match_selector.rb
isomorfeus-puppetmaster-0.3.4 lib/isomorfeus/puppetmaster/rspec/matchers/match_selector.rb
isomorfeus-puppetmaster-0.3.3 lib/isomorfeus/puppetmaster/rspec/matchers/match_selector.rb
isomorfeus-puppetmaster-0.3.2 lib/isomorfeus/puppetmaster/rspec/matchers/match_selector.rb
isomorfeus-puppetmaster-0.3.1 lib/isomorfeus/puppetmaster/rspec/matchers/match_selector.rb
capybara-3.30.0 lib/capybara/rspec/matchers/match_selector.rb
tdiary-5.1.0 vendor/bundle/gems/capybara-3.29.0/lib/capybara/rspec/matchers/match_selector.rb
isomorfeus-puppetmaster-0.3.0 lib/isomorfeus/puppetmaster/rspec/matchers/match_selector.rb