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

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

Direct Known Subclasses

HaveStyle

Instance Attribute Summary

Attributes inherited from Base

#failure_message, #failure_message_when_negated

Instance Method Summary collapse

Methods inherited from WrappedElementMatcher

#matches?

Methods inherited from Base

#initialize

Methods included from Compound

#and, #and_then, #or

Constructor Details

This class inherits a constructor from Capybara::RSpecMatchers::Matchers::Base

Instance Method Details

#descriptionObject



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

def description
  'match style'
end

#does_not_match?(_actual) ⇒ Boolean

Returns:

  • (Boolean)

Raises:

  • (ArgumentError)


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

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

Returns:

  • (Boolean)


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

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