Class: Capybara::RSpecMatchers::Matchers::HaveText
Relationships & Source Files | |
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_text.rb |
Class Method Summary
Instance Attribute Summary
Base
- Inherited
Instance Method Summary
- #description
- #element_does_not_match?(el) ⇒ Boolean
- #element_matches?(el) ⇒ Boolean
- #format(content)
- #text private
RSpecMatchers::SpatialSugar
- Included
RSpecMatchers::CountSugar
- Included
WrappedElementMatcher
- Inherited
Base
- Inherited
Compound
- Included
Constructor Details
This class inherits a constructor from Capybara::RSpecMatchers::Matchers::Base
Instance Method Details
#description
[ GitHub ]
#element_does_not_match?(el) ⇒ Boolean
# File 'lib/capybara/rspec/matchers/have_text.rb', line 13
def element_does_not_match?(el) el.assert_no_text(*@args, **@kw_args) end
#element_matches?(el) ⇒ Boolean
# File 'lib/capybara/rspec/matchers/have_text.rb', line 9
def element_matches?(el) el.assert_text(*@args, **@kw_args) end
#format(content)
[ GitHub ]# File 'lib/capybara/rspec/matchers/have_text.rb', line 21
def format(content) content.inspect end
#text (private)
[ GitHub ]# File 'lib/capybara/rspec/matchers/have_text.rb', line 27
def text @args[0].is_a?(Symbol) ? @args[1] : @args[0] end