This might be better as an expectation of the desired behavior rather than internal state. `expect(@cloud).to receive(:sleep).with(3)`