Class: Mocha::ParameterMatchers::Anything

Inherits:
Base show all
Defined in:
lib/mocha/parameter_matchers/anything.rb

Overview

Parameter matcher which always matches a single parameter.

Instance Method Summary collapse

Methods inherited from Base

#&, #to_matcher, #|

Instance Method Details

#matches?(available_parameters) ⇒ Boolean

Returns:

  • (Boolean)

28
29
30
31
# File 'lib/mocha/parameter_matchers/anything.rb', line 28

def matches?(available_parameters)
  available_parameters.shift
  return true
end

#mocha_inspectObject


34
35
36
# File 'lib/mocha/parameter_matchers/anything.rb', line 34

def mocha_inspect
  "anything"
end