Validator for call counts less than or equal to a limit.
Human readable description of the validator
# File lib/flexmock/validators.rb, line 129 def describe ".at_most#{super}" end
Validate the method expectation was called at least n
times.
# File lib/flexmock/validators.rb, line 116 def validate(n) @exp.flexmock_location_filter do FlexMock.framework_adapter.assert_block( lambda { "Method '#{@exp}' called incorrect number of times\n" + "At most #{@limit} matching #{calls(@limit)} expected\n" + "#{n} matching #{calls(n)} found\n" + describe_calls(@exp.mock) }) { n <= @limit } end end