123456789_123456789_123456789_123456789_123456789_

Class: Capybara::RSpecMatchers::Matchers::MatchStyle

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Subclasses:
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
self, WrappedElementMatcher, Base, Compound, RSpec::Matchers::Composable
Inherits: Capybara::RSpecMatchers::Matchers::WrappedElementMatcher
Defined in: lib/capybara/rspec/matchers/match_style.rb

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new(styles = nil, **kw_args, &filter_block) ⇒ MatchStyle

[ GitHub ]

  
# File 'lib/capybara/rspec/matchers/match_style.rb', line 9

def initialize(styles = nil, **kw_args, &filter_block)
  styles, kw_args = kw_args, {} if styles.nil?
  super(styles, **kw_args, &filter_block)
end

Instance Method Details

#description

[ GitHub ]

  
# File 'lib/capybara/rspec/matchers/match_style.rb', line 22

def description
  'match style'
end

#does_not_match?(_actual) ⇒ Boolean

Raises:

  • (ArgumentError)
[ GitHub ]

  
# File 'lib/capybara/rspec/matchers/match_style.rb', line 18

def does_not_match?(_actual)
  raise ArgumentError, 'The match_style matcher does not support use with not_to/should_not'
end

#element_matches?(el) ⇒ Boolean

[ GitHub ]

  
# File 'lib/capybara/rspec/matchers/match_style.rb', line 14

def element_matches?(el)
  el.assert_matches_style(*@args, **@kw_args)
end