# File lib/rspec/mocks/message_expectation.rb, line 287 def once(&block) @method_block = block if block @expected_received_count = 1 self end