FlexMock::AtLeastCountValidator

                                                                  

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

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? Since this validator only establishes a lower limit, not an upper limit, then the answer is always true.

    # File lib/flexmock/validators.rb, line 61
61:     def eligible?(n)
62:       true
63:     end
validate(n) click to toggle source

Validate the method expectation was called no more than n times.

    # File lib/flexmock/validators.rb, line 51
51:     def validate(n)
52:       FlexMock.framework_adapter.assert_block(
53:         "Method '#{@exp}' should be called at least #{@limit} times,\n" +
54:         "only called #{n} times") { n >= @limit }
55:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.