Class: FlexMock::ExactCountValidator

Inherits:
CountValidator show all
Defined in:
lib/gems/flexmock-0.8.3/lib/flexmock/validators.rb

Overview

Validator for exact call counts.

Instance Method Summary collapse

Methods inherited from CountValidator

#eligible?, #initialize

Constructor Details

This class inherits a constructor from FlexMock::CountValidator

Instance Method Details

#validate(n) ⇒ Object

Validate that the method expectation was called exactly n times.



39
40
41
42
# File 'lib/gems/flexmock-0.8.3/lib/flexmock/validators.rb', line 39

def validate(n)
  FlexMock.framework_adapter.assert_equal @limit, n,
    "method '#{@exp}' called incorrect number of times"
end