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



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

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

#does_not_match?(actual) ⇒ Boolean

Returns:

  • (Boolean)


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

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)


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

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

#queryObject



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

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