Class: FlexMock::ExactCountValidator
- Inherits:
-
CountValidator
- Object
- CountValidator
- FlexMock::ExactCountValidator
- Defined in:
- lib/flexmock/validators.rb
Overview
Validator for exact call counts.
Instance Method Summary collapse
-
#validate(n) ⇒ Object
Validate that the method expectation was called exactly
n
times.
Methods inherited from CountValidator
#describe, #describe_limit, #eligible?, #initialize, #validate_count
Methods included from SpyDescribers
#append_call_record, #block_description, #describe_calls, #describe_spy, #describe_spy_expectation, #describe_spy_negative_expectation, #spy_description, #times_description
Constructor Details
This class inherits a constructor from FlexMock::CountValidator
Instance Method Details
#validate(n) ⇒ Object
Validate that the method expectation was called exactly n
times.
85 86 87 |
# File 'lib/flexmock/validators.rb', line 85 def validate(n) validate_count(n) { @limit == n } end |