Class: Capybara::RSpecMatchers::Matchers::NegatedMatcher
- Inherits:
-
Object
- Object
- Capybara::RSpecMatchers::Matchers::NegatedMatcher
- Includes:
- Compound
- Defined in:
- lib/capybara/rspec/matchers/base.rb
Instance Method Summary collapse
- #description ⇒ Object
- #does_not_match?(actual) ⇒ Boolean
- #failure_message ⇒ Object
- #failure_message_when_negated ⇒ Object
-
#initialize(matcher) ⇒ NegatedMatcher
constructor
A new instance of NegatedMatcher.
- #matches?(actual) ⇒ Boolean
Methods included from Compound
Constructor Details
#initialize(matcher) ⇒ NegatedMatcher
Returns a new instance of NegatedMatcher.
71 72 73 74 |
# File 'lib/capybara/rspec/matchers/base.rb', line 71 def initialize(matcher) super() @matcher = matcher end |
Instance Method Details
#description ⇒ Object
84 85 86 |
# File 'lib/capybara/rspec/matchers/base.rb', line 84 def description "not #{@matcher.description}" end |
#does_not_match?(actual) ⇒ Boolean
80 81 82 |
# File 'lib/capybara/rspec/matchers/base.rb', line 80 def does_not_match?(actual) @matcher.matches?(actual) end |
#failure_message ⇒ Object
88 89 90 |
# File 'lib/capybara/rspec/matchers/base.rb', line 88 def @matcher. end |
#failure_message_when_negated ⇒ Object
92 93 94 |
# File 'lib/capybara/rspec/matchers/base.rb', line 92 def @matcher. end |
#matches?(actual) ⇒ Boolean
76 77 78 |
# File 'lib/capybara/rspec/matchers/base.rb', line 76 def matches?(actual) @matcher.does_not_match?(actual) end |