Class: Capybara::RSpecMatchers::Matchers::HaveAnySelectors

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



66
67
68
# File 'lib/capybara/rspec/matchers/have_selector.rb', line 66

def description
  'have any selectors'
end

#does_not_match?(_actual) ⇒ Boolean

Returns:

  • (Boolean)


62
63
64
# File 'lib/capybara/rspec/matchers/have_selector.rb', line 62

def does_not_match?(_actual)
  el.assert_none_of_selectors(*@args, &@filter_block)
end

#element_matches?(el) ⇒ Boolean

Returns:

  • (Boolean)


58
59
60
# File 'lib/capybara/rspec/matchers/have_selector.rb', line 58

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