Class: Capybara::RSpecMatchers::Matchers::HaveAllSelectors

Inherits:
WrappedElementMatcher show all
Defined in:
lib/capybara/rspec/matchers/have_selector.rb

Instance Attribute Summary

Attributes inherited from Base

#failure_message, #failure_message_when_negated

Instance Method Summary collapse

Methods inherited from WrappedElementMatcher

#matches?

Methods inherited from Base

#initialize

Methods included from Compound

#and, #and_then, #or

Constructor Details

This class inherits a constructor from Capybara::RSpecMatchers::Matchers::Base

Instance Method Details

#descriptionObject



43
44
45
# File 'lib/capybara/rspec/matchers/have_selector.rb', line 43

def description
  'have all selectors'
end

#does_not_match?(_actual) ⇒ Boolean

Returns:

  • (Boolean)

Raises:

  • (ArgumentError)


39
40
41
# File 'lib/capybara/rspec/matchers/have_selector.rb', line 39

def does_not_match?(_actual)
  raise ArgumentError, 'The have_all_selectors matcher does not support use with not_to/should_not'
end

#element_matches?(el) ⇒ Boolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/capybara/rspec/matchers/have_selector.rb', line 35

def element_matches?(el)
  el.assert_all_of_selectors(*@args, **session_query_options, &@filter_block)
end