Class: Capybara::RSpecMatchers::HaveSelector
- Inherits:
-
Matcher
- Object
- Matcher
- Capybara::RSpecMatchers::HaveSelector
- Defined in:
- lib/capybara/rspec/matchers.rb
Instance Method Summary (collapse)
- - (Object) description
- - (Boolean) does_not_match?(actual)
-
- (HaveSelector) initialize(*args)
constructor
A new instance of HaveSelector.
- - (Boolean) matches?(actual)
- - (Object) query
Methods inherited from Matcher
Constructor Details
- (HaveSelector) initialize(*args)
A new instance of HaveSelector
14 15 16 |
# File 'lib/capybara/rspec/matchers.rb', line 14 def initialize(*args) @args = args end |
Instance Method Details
- (Object) description
26 27 28 |
# File 'lib/capybara/rspec/matchers.rb', line 26 def description "have #{query.description}" end |
- (Boolean) does_not_match?(actual)
22 23 24 |
# File 'lib/capybara/rspec/matchers.rb', line 22 def does_not_match?(actual) wrap(actual).assert_no_selector(*@args) end |
- (Boolean) matches?(actual)
18 19 20 |
# File 'lib/capybara/rspec/matchers.rb', line 18 def matches?(actual) wrap(actual).assert_selector(*@args) end |
- (Object) query
30 31 32 |
# File 'lib/capybara/rspec/matchers.rb', line 30 def query @query ||= Capybara::Query.new(*@args) end |