Class: Capybara::RSpecMatchers::NegatedMatcher
- Inherits:
-
Object
- Object
- Capybara::RSpecMatchers::NegatedMatcher
- Includes:
- Compound
- Defined in:
- lib/capybara/rspec/matchers.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.
207 208 209 |
# File 'lib/capybara/rspec/matchers.rb', line 207 def initialize(matcher) @matcher = matcher end |
Instance Method Details
#description ⇒ Object
219 220 221 |
# File 'lib/capybara/rspec/matchers.rb', line 219 def description "not #{@matcher.description}" end |
#does_not_match?(actual) ⇒ Boolean
215 216 217 |
# File 'lib/capybara/rspec/matchers.rb', line 215 def does_not_match?(actual) @matcher.matches?(actual) end |
#failure_message ⇒ Object
223 224 225 |
# File 'lib/capybara/rspec/matchers.rb', line 223 def @matcher. end |
#failure_message_when_negated ⇒ Object
227 228 229 |
# File 'lib/capybara/rspec/matchers.rb', line 227 def @matcher. end |
#matches?(actual) ⇒ Boolean
211 212 213 |
# File 'lib/capybara/rspec/matchers.rb', line 211 def matches?(actual) @matcher.does_not_match?(actual) end |