class FlexMock::AtMostCountValidator

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

Public Instance Methods

validate(n) click to toggle source

Validate the method expectation was called at least n times.

# File 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