123456789_123456789_123456789_123456789_123456789_

Class: Capybara::RSpecMatchers::Matchers::NegatedMatcher

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Instance Chain:
self, Compound, RSpec::Matchers::Composable
Inherits: Object
Defined in: lib/capybara/rspec/matchers/base.rb

Class Method Summary

Instance Method Summary

Constructor Details

.new(matcher) ⇒ NegatedMatcher

[ GitHub ]

  
# File 'lib/capybara/rspec/matchers/base.rb', line 86

def initialize(matcher)
  super()
  @matcher = matcher
end

Instance Method Details

#description

[ GitHub ]

  
# File 'lib/capybara/rspec/matchers/base.rb', line 99

def description
  "not #{@matcher.description}"
end

#does_not_match?(actual, &filter_block) ⇒ Boolean

[ GitHub ]

  
# File 'lib/capybara/rspec/matchers/base.rb', line 95

def does_not_match?(actual, &filter_block)
  @matcher.matches?(actual, &filter_block)
end

#failure_message

[ GitHub ]

  
# File 'lib/capybara/rspec/matchers/base.rb', line 103

def failure_message
  @matcher.failure_message_when_negated
end

#failure_message_when_negated

[ GitHub ]

  
# File 'lib/capybara/rspec/matchers/base.rb', line 107

def failure_message_when_negated
  @matcher.failure_message
end

#matches?(actual, &filter_block) ⇒ Boolean

[ GitHub ]

  
# File 'lib/capybara/rspec/matchers/base.rb', line 91

def matches?(actual, &filter_block)
  @matcher.does_not_match?(actual, &filter_block)
end