Class: Capybara::RSpecMatchers::Matchers::HaveSibling
- Inherits:
-
CountableWrappedElementMatcher
- Object
- Base
- WrappedElementMatcher
- CountableWrappedElementMatcher
- Capybara::RSpecMatchers::Matchers::HaveSibling
- Defined in:
- lib/capybara/rspec/matchers/have_sibling.rb
Instance Attribute Summary
Attributes inherited from Base
#failure_message, #failure_message_when_negated
Instance Method Summary collapse
- #description ⇒ Object
- #element_does_not_match?(el) ⇒ Boolean
- #element_matches?(el) ⇒ Boolean
- #query ⇒ Object
Methods included from SpatialSugar
#above, #below, #left_of, #near, #right_of
Methods included from CountSugar
#at_least, #at_most, #exactly, #once, #thrice, #times, #twice
Methods inherited from WrappedElementMatcher
Methods inherited from Base
Methods included from Compound
Constructor Details
This class inherits a constructor from Capybara::RSpecMatchers::Matchers::Base
Instance Method Details
#description ⇒ Object
17 18 19 |
# File 'lib/capybara/rspec/matchers/have_sibling.rb', line 17 def description "have sibling #{query.description}" end |
#element_does_not_match?(el) ⇒ Boolean
13 14 15 |
# File 'lib/capybara/rspec/matchers/have_sibling.rb', line 13 def element_does_not_match?(el) el.assert_no_sibling(*@args, **, &@filter_block) end |
#element_matches?(el) ⇒ Boolean
9 10 11 |
# File 'lib/capybara/rspec/matchers/have_sibling.rb', line 9 def element_matches?(el) el.assert_sibling(*@args, **, &@filter_block) end |
#query ⇒ Object
21 22 23 |
# File 'lib/capybara/rspec/matchers/have_sibling.rb', line 21 def query @query ||= Capybara::Queries::SiblingQuery.new(*session_query_args, **, &@filter_block) end |