Class: Mocha::ParameterMatchers::AnyParameters

Inherits:
Base
  • Object
show all
Defined in:
lib/mocha/parameter_matchers/any_parameters.rb

Overview

Parameter matcher which always matches whatever the parameters.

Instance Method Summary collapse

Methods inherited from Base

#&, #to_matcher, #|

Instance Method Details

#matches?(available_parameters) ⇒ Boolean


31
32
33
34
35
36
# File 'lib/mocha/parameter_matchers/any_parameters.rb', line 31

def matches?(available_parameters)
  while available_parameters.length > 0 do
    available_parameters.shift
  end
  return true
end

#mocha_inspectObject


39
40
41
# File 'lib/mocha/parameter_matchers/any_parameters.rb', line 39

def mocha_inspect
  "any_parameters"
end