You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: rabbitmq.rb
    path of file: ./repos/open-build-service/src/api/spec/support
    
    the code of the file until where you have to start completion: module RabbitMQHelpers
  cattr_accessor :test_queue

  def empty_message_queue
    test_queue
    
  def expect_message(routing_key, message_expected = nil)
    message = test_queue.all.shift
    if message_expected
      expect(message).to include(message: message_expected, options: { routing_key: routing_key, exchange: 'pubsub' })
    else
      expect(message).to include(options: { routing_key: routing_key, exchange: 'pubsub' })
      JSON.parse(message[:message])
    end