class FlexMock::CountValidator

Base class for all the count validators.

Public Instance Methods

eligible?(n) click to toggle source

If the expectation has been called n times, is it still eligible to be called again? The default answer compares n to the established limit.

# File lib/flexmock/validators.rb, line 28
def eligible?(n)
  n < @limit
end

Public Class Methods

new(expectation, limit) click to toggle source
# File lib/flexmock/validators.rb, line 20
def initialize(expectation, limit)
  @exp = expectation
  @limit = limit
end