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 76 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 69 def self.handle_matcher(actual, initial_matcher, message=nil, &block) ExpectationHelper.with_matcher(self, initial_matcher, message) do |matcher| return ::RSpec::Matchers::BuiltIn::NegativeOperatorMatcher.new(actual) unless initial_matcher does_not_match?(matcher, actual, &block) || ExpectationHelper.handle_failure(matcher, message, :failure_message_when_negated) end end
opposite_should_method()
click to toggle source
# File lib/rspec/expectations/handler.rb, line 92 def self.opposite_should_method :should end
should_method()
click to toggle source
# File lib/rspec/expectations/handler.rb, line 88 def self.should_method :should_not end
verb()
click to toggle source
# File lib/rspec/expectations/handler.rb, line 84 def self.verb "should not" end