Module | RR::DoubleDefinitions::DoubleDefinition::TimesDefinitionConstructionMethods |
In: |
lib/rr/double_definitions/double_definition.rb
|
Double#once sets the expectation that the Double will be called 1 time.
Passing in a block sets the return value.
mock(subject).method_name.once {:return_value}
Double#times creates an TimesCalledExpectation of the passed in number.
Passing in a block sets the return value.
mock(subject).method_name.times(4) {:return_value}