class RSpec::Expectations::NegativeExpectationHandler

@private

Public Class Methods

does_not_match?(matcher, actual, &block) click to toggle source
# File lib/rspec/expectations/handler.rb, line 74
def self.does_not_match?(matcher, actual, &block)
  if matcher.respond_to?(:does_not_match?)
    matcher.does_not_match?(actual, &block)
  else
    !matcher.matches?(actual, &block)
  end
end
handle_matcher(actual, initial_matcher, message=nil, &block) click to toggle source
# File lib/rspec/expectations/handler.rb, line 67
def self.handle_matcher(actual, initial_matcher, message=nil, &block)
  matcher = ExpectationHelper.setup(self, initial_matcher, message)

  return ::RSpec::Matchers::BuiltIn::NegativeOperatorMatcher.new(actual) unless initial_matcher
  !(does_not_match?(matcher, actual, &block) or ExpectationHelper.handle_failure(matcher, message, :failure_message_when_negated))
end
opposite_should_method() click to toggle source
# File lib/rspec/expectations/handler.rb, line 90
def self.opposite_should_method
  :should
end
should_method() click to toggle source
# File lib/rspec/expectations/handler.rb, line 86
def self.should_method
  :should_not
end
verb() click to toggle source
# File lib/rspec/expectations/handler.rb, line 82
def self.verb
  "should not"
end