Class: Capybara::RSpecMatchers::Matchers::HaveNoSelectors

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



52
53
54
# File 'lib/capybara/rspec/matchers/have_selector.rb', line 52

def description
  'have no selectors'
end

#does_not_match?(_actual) ⇒ Boolean

Returns:

  • (Boolean)

Raises:

  • (ArgumentError)


48
49
50
# File 'lib/capybara/rspec/matchers/have_selector.rb', line 48

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

#element_matches?(el) ⇒ Boolean

Returns:

  • (Boolean)


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

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