Class: Capybara::RSpecMatchers::Matchers::MatchSelector

Inherits:
HaveSelector show all
Defined in:
lib/capybara/rspec/matchers/match_selector.rb

Instance Attribute Summary

Attributes inherited from Base

#failure_message, #failure_message_when_negated

Instance Method Summary collapse

Methods inherited from HaveSelector

#initialize

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

#does_not_match?, #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::HaveSelector

Instance Method Details

#descriptionObject

 17 18 19
# File 'lib/capybara/rspec/matchers/match_selector.rb', line 17 def description "match #{query.description}" end 

#element_does_not_match?(el) ⇒ Boolean

Returns:

  • (Boolean)
 13 14 15
# File 'lib/capybara/rspec/matchers/match_selector.rb', line 13 def element_does_not_match?(el) el.assert_not_matches_selector(*@args, **session_query_options, &@filter_block) end 

#element_matches?(el) ⇒ Boolean

Returns:

  • (Boolean)
 9 10 11
# File 'lib/capybara/rspec/matchers/match_selector.rb', line 9 def element_matches?(el) el.assert_matches_selector(*@args, **session_query_options, &@filter_block) end 

#queryObject

 21 22 23
# File 'lib/capybara/rspec/matchers/match_selector.rb', line 21 def query @query ||= Capybara::Queries::MatchQuery.new(*session_query_args, **session_query_options, &@filter_block) end