# File lib/rspec/mocks/message_expectation.rb, line 73 def and_return(*values, &implementation) if negative? RSpec.deprecate "`and_return` on a negative message expectation" end @expected_received_count = [@expected_received_count, values.size].max unless ignoring_args? || (@expected_received_count == 0 and @at_least) if implementation # TODO: deprecate `and_return { value }` self.inner_implementation_action = implementation else self.terminal_implementation_action = AndReturnImplementation.new(values) end nil end