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, &filter_block) ⇒ Boolean
- #failure_message ⇒ Object
- #failure_message_when_negated ⇒ Object
-
#initialize(matcher) ⇒ NegatedMatcher
constructor
A new instance of NegatedMatcher.
- #matches?(actual, &filter_block) ⇒ Boolean
Methods included from Compound
Constructor Details
#initialize(matcher) ⇒ NegatedMatcher
Returns a new instance of NegatedMatcher.
86 87 88 89 |
# File 'lib/capybara/rspec/matchers/base.rb', line 86 def initialize(matcher) super() @matcher = matcher end |
Instance Method Details
#description ⇒ Object
99 100 101 |
# File 'lib/capybara/rspec/matchers/base.rb', line 99 def description "not #{@matcher.description}" end |
#does_not_match?(actual, &filter_block) ⇒ Boolean
95 96 97 |
# File 'lib/capybara/rspec/matchers/base.rb', line 95 def does_not_match?(actual, &filter_block) @matcher.matches?(actual, &filter_block) end |
#failure_message ⇒ Object
103 104 105 |
# File 'lib/capybara/rspec/matchers/base.rb', line 103 def @matcher. end |
#failure_message_when_negated ⇒ Object
107 108 109 |
# File 'lib/capybara/rspec/matchers/base.rb', line 107 def @matcher. end |
#matches?(actual, &filter_block) ⇒ Boolean
91 92 93 |
# File 'lib/capybara/rspec/matchers/base.rb', line 91 def matches?(actual, &filter_block) @matcher.does_not_match?(actual, &filter_block) end |