class Mocha::ParameterMatchers::Not

Parameter matcher which inverts the logic of the specified matcher using a logical NOT operation.

Public Class Methods

new(matcher) click to toggle source

@private

# File lib/mocha/parameter_matchers/not.rb, line 31
def initialize(matcher)
  @matcher = matcher
end

Public Instance Methods

matches?(available_parameters) click to toggle source

@private

# File lib/mocha/parameter_matchers/not.rb, line 36
def matches?(available_parameters)
  parameter = available_parameters.shift
  !@matcher.matches?([parameter])
end
mocha_inspect() click to toggle source

@private

# File lib/mocha/parameter_matchers/not.rb, line 42
def mocha_inspect
  "Not(#{@matcher.mocha_inspect})"
end