module Spectator::Mocks::ReceiveCountExpectationModifiers
Direct including types
Defined in:
spectator/mocks/receive_count_expectation_modifiers.crInstance Method Summary
-
#at_least(count : ReceiveCountKeyword)
Modifies the expectation to check for at least a specified number of calls.
-
#at_least(n : Int)
Modifies the expectation to check for at least a specified number of calls.
-
#at_most(count : ReceiveCountKeyword)
Modifies the expectation to check for at most a specified number of calls.
-
#at_most(n : Int)
Modifies the expectation to check for at most a specified number of calls.
-
#exactly(n : Int)
Modifies the expectation to check for an exact number of calls.
-
#exactly(count : ReceiveCountKeyword)
Modifies the expectation to check for an exact number of calls.
-
#once
Modifies the expectation to check for exactly one matching call.
-
#twice
Modifies the expectation to check for exactly two matching calls.
Instance Method Detail
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)
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
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)
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
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
Modifies the expectation to check for an exact number of calls.
double.some_method
double.should have_received(:some_method).exactly(:once)
Modifies the expectation to check for exactly one matching call.
double.some_method
double.should have_received(:some_method).once
Modifies the expectation to check for exactly two matching calls.
double.some_method
double.some_method
double.should have_received(:some_method).twice