Class: Capybara::RSpecMatchers::Matchers::HaveSelector
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Subclasses:
|
|
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
|
|
Instance Chain:
self,
CountableWrappedElementMatcher ,
RSpecMatchers::SpatialSugar ,
RSpecMatchers::CountSugar ,
WrappedElementMatcher ,
Base ,
Compound ,
RSpec::Matchers::Composable
|
|
Inherits: |
Capybara::RSpecMatchers::Matchers::CountableWrappedElementMatcher
|
Defined in: | lib/capybara/rspec/matchers/have_selector.rb |
Class Method Summary
Instance Attribute Summary
Base
- Inherited
Instance Method Summary
RSpecMatchers::SpatialSugar
- Included
RSpecMatchers::CountSugar
- Included
WrappedElementMatcher
- Inherited
Base
- Inherited
Compound
- Included
Constructor Details
.new(*args, **kw_args, &filter_block) ⇒ HaveSelector
# File 'lib/capybara/rspec/matchers/have_selector.rb', line 9
def initialize(*args, **kw_args, &filter_block) super return unless (@args.size < 2) && @kw_args.keys.any?(String) @args.push(@kw_args) @kw_args = {} end
Instance Method Details
#description
[ GitHub ]# File 'lib/capybara/rspec/matchers/have_selector.rb', line 25
def description = "have #{query.description}"
#element_does_not_match?(el) ⇒ Boolean
# File 'lib/capybara/rspec/matchers/have_selector.rb', line 21
def element_does_not_match?(el) el.assert_no_selector(*@args, **, &@filter_block) end
#element_matches?(el) ⇒ Boolean
# File 'lib/capybara/rspec/matchers/have_selector.rb', line 17
def element_matches?(el) el.assert_selector(*@args, **, &@filter_block) end
#query
[ GitHub ]# File 'lib/capybara/rspec/matchers/have_selector.rb', line 27
def query @query ||= Capybara::Queries::SelectorQuery.new(*session_query_args, **, &@filter_block) end