# File lib/rspec/mocks/message_expectation.rb, line 293 def twice(&block) @method_block = block if block @expected_received_count = 2 self end