module RSpec::Mocks::Syntax

def stub(message_or_hash, opts={}, &block)

def stub(message_or_hash, opts={}, &block)
  ::RSpec::Mocks::Syntax.warn_unless_should_configured(__method__)
  if ::Hash === message_or_hash
    message_or_hash.each {|message, value| stub(message).and_return value }
  else
    ::RSpec::Mocks.allow_message(self, message_or_hash, opts, &block)
  end
end