class FlexMock::AtMostCountValidator

Validator for call counts less than or equal to a limit.

Public Instance Methods

describe() click to toggle source

Human readable description of the validator

# File lib/flexmock/validators.rb, line 124
def describe
  ".at_most#{super}"
end
describe_limit() click to toggle source
# File lib/flexmock/validators.rb, line 128
def describe_limit
  "At most #{@limit}"
end
validate(n) click to toggle source

Validate the method expectation was called at least n times.

# File lib/flexmock/validators.rb, line 119
def validate(n)
  validate_count(n) { n <= @limit }
end