Class: FlexMock::AtMostCountValidator
- Inherits:
-
CountValidator
- Object
- CountValidator
- FlexMock::AtMostCountValidator
- Defined in:
- lib/gems/flexmock-0.8.3/lib/flexmock/validators.rb
Overview
Validator for call counts less than or equal to a limit.
Instance Method Summary collapse
-
#validate(n) ⇒ Object
Validate the method expectation was called at least
n
times.
Methods inherited from CountValidator
Constructor Details
This class inherits a constructor from FlexMock::CountValidator
Instance Method Details
#validate(n) ⇒ Object
Validate the method expectation was called at least n
times.
71 72 73 74 75 |
# File 'lib/gems/flexmock-0.8.3/lib/flexmock/validators.rb', line 71 def validate(n) FlexMock.framework_adapter.assert_block( "Method '#{@exp}' should be called at most #{@limit} times,\n" + "only called #{n} times") { n <= @limit } end |