Module: Dommy::RSpec::CapyStyleMatchers::Negated Private
- Included in:
- HaveNoButton, HaveNoField, HaveNoLink, HaveNoSelector
- Defined in:
- lib/dommy/rspec/capy_style_matchers.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Mixin that flips matches? / does_not_match? for the “no_*” matchers, so each negative matcher reads identically to its positive twin but with inverted assertions.
Instance Method Summary collapse
- #does_not_match?(scope) ⇒ Boolean private
- #failure_message ⇒ Object private
- #failure_message_when_negated ⇒ Object private
- #matches?(scope) ⇒ Boolean private
Instance Method Details
#does_not_match?(scope) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
162 163 164 |
# File 'lib/dommy/rspec/capy_style_matchers.rb', line 162 def does_not_match?(scope) !matches?(scope) end |
#failure_message ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
166 167 168 |
# File 'lib/dommy/rspec/capy_style_matchers.rb', line 166 def "expected NOT to find #{describe_target}, found #{@matched.size}" end |
#failure_message_when_negated ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
170 171 172 |
# File 'lib/dommy/rspec/capy_style_matchers.rb', line 170 def "expected to find #{describe_target}, found #{@matched.size}" end |
#matches?(scope) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
158 159 160 |
# File 'lib/dommy/rspec/capy_style_matchers.rb', line 158 def matches?(scope) !super end |