class RSpec::Mocks::MessageExpectation

def at_most(n, &block)

dealer.should_receive(:deal_card).at_most(10).times

@example

number of times.
Constrain a message expectation to be received at most a specific
def at_most(n, &block)
  self.inner_implementation_action = block
  set_expected_received_count :at_most, n
  self
end