class RSpec::Mocks::MessageExpectation

def once(&block)

car.should_receive(:go).once

@example

Expect a message to be received exactly one time.
def once(&block)
  self.inner_implementation_action = block
  set_expected_received_count :exactly, 1
  self
end