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


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

def description
  'have any selectors'
end

#does_not_match?(_actual) ⇒ Boolean


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

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

#element_matches?(el) ⇒ Boolean


55
56
57
# File 'lib/capybara/rspec/matchers/have_selector.rb', line 55

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