module

Mocks::ReceiveCountExpectationModifiers

Instance methods

at_least(count : ReceiveCountKeyword)

Modifies the expectation to check for at least a specified number of calls.

3.times { double.some_method }
double.should have_received(:some_method).at_least(:once)
Source
at_least(n : Int)

Modifies the expectation to check for at least a specified number of calls.

3.times { double.some_method }
double.should have_received(:some_method).at_least(1).time
Source
at_most(count : ReceiveCountKeyword)

Modifies the expectation to check for at most a specified number of calls.

2.times { double.some_method }
double.should have_received(:some_method).at_most(:twice)
Source
at_most(n : Int)

Modifies the expectation to check for at most a specified number of calls.

2.times { double.some_method }
double.should have_received(:some_method).at_most(3).times
Source
exactly(n : Int)

Modifies the expectation to check for an exact number of calls.

3.times { double.some_method }
double.should have_received(:some_method).exactly(3).times
Source
exactly(count : ReceiveCountKeyword)

Modifies the expectation to check for an exact number of calls.

double.some_method
double.should have_received(:some_method).exactly(:once)
Source
once

Modifies the expectation to check for exactly one matching call.

double.some_method
double.should have_received(:some_method).once
Source
twice

Modifies the expectation to check for exactly two matching calls.

double.some_method
double.some_method
double.should have_received(:some_method).twice
Source