Class: Capybara::RSpecMatchers::MatchSelector

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

Instance Attribute Summary

Attributes inherited from Matcher

#failure_message, #failure_message_when_negated

Instance Method Summary collapse

Methods inherited from HaveSelector

#initialize

Methods inherited from Matcher

#wrap

Methods included from Compound

#and, #and_then, #or

Constructor Details

This class inherits a constructor from Capybara::RSpecMatchers::HaveSelector

Instance Method Details

#descriptionObject



128
129
130
# File 'lib/capybara/rspec/matchers.rb', line 128

def description
  "match #{query.description}"
end

#does_not_match?(actual) ⇒ Boolean

Returns:

  • (Boolean)


124
125
126
# File 'lib/capybara/rspec/matchers.rb', line 124

def does_not_match?(actual)
  wrap_does_not_match?(actual) { |el| el.assert_not_matches_selector(*@args, &@filter_block) }
end

#matches?(actual) ⇒ Boolean

Returns:

  • (Boolean)


120
121
122
# File 'lib/capybara/rspec/matchers.rb', line 120

def matches?(actual)
  wrap_matches?(actual) { |el| el.assert_matches_selector(*@args, &@filter_block) }
end

#queryObject



132
133
134
# File 'lib/capybara/rspec/matchers.rb', line 132

def query
  @query ||= Capybara::Queries::MatchQuery.new(*session_query_args, &@filter_block)
end