Class: Mocha::ParameterMatchers::Equals
Overview
Parameter matcher which matches when actual parameter equals expected value.
Instance Method Summary (collapse)
-
- (Equals) initialize(value)
constructor
A new instance of Equals.
- - (Boolean) matches?(available_parameters)
- - (Object) mocha_inspect
Methods inherited from Base
#&, #to_matcher, #|
Constructor Details
- (Equals) initialize(value)
A new instance of Equals
34 35 36 |
# File 'lib/mocha/parameter_matchers/equals.rb', line 34 def initialize(value) @value = value end |
Instance Method Details
- (Boolean) matches?(available_parameters)
39 40 41 42 |
# File 'lib/mocha/parameter_matchers/equals.rb', line 39 def matches?(available_parameters) parameter = available_parameters.shift parameter == @value end |
- (Object) mocha_inspect
45 46 47 |
# File 'lib/mocha/parameter_matchers/equals.rb', line 45 def mocha_inspect @value.mocha_inspect end |