class FlexMock::AtLeastCountValidator
Validator for call counts greater than or equal to a limit.
Public Instance Methods
Source
# File lib/flexmock/validators.rb, line 100 def describe if @limit == 0 ".zero_or_more_times" else ".at_least#{super}" end end
Human readable description of the validator.
Source
# File lib/flexmock/validators.rb, line 116 def describe_limit "At least #{@limit}" end
Source
# File lib/flexmock/validators.rb, line 112 def eligible?(n) true end
If the expectation has been called n
times, is it still eligible to be called again? Since this validator only establishes a lower limit, not an upper limit, then the answer is always true.
Source
# File lib/flexmock/validators.rb, line 95 def validate(n) validate_count(n) { n >= @limit } end
Validate the method expectation was called no more than n
times.