Sha256: 76a36795041ff88c63f164b573030b435d08c77631eab4e80f3edf54f7404633

Contents?: true

Size: 1 KB

Versions: 1

Compression:

Stored size: 1 KB

Contents

# frozen_string_literal: true
require 'bunny_mock/version'

require 'bunny/exceptions'
require 'amq/protocol/client'

require 'bunny_mock/session'
require 'bunny_mock/channel'
require 'bunny_mock/exchange'
require 'bunny_mock/queue'

require 'bunny_mock/exchanges/direct'
require 'bunny_mock/exchanges/topic'
require 'bunny_mock/exchanges/fanout'
require 'bunny_mock/exchanges/headers'

##
# A mock RabbitMQ client based on Bunny
#
# @see https://github.com/ruby-amq/bunny
#
module BunnyMock
  # AMQP protocol version
  PROTOCOL_VERSION = AMQ::Protocol::PROTOCOL_VERSION

  class << self
    #
    # API
    #

    ##
    # Instantiate a new mock Bunny session
    #
    # @return [BunnyMock::Session] Session instance
    # @api public
    def new(*)
      # return new mock session
      BunnyMock::Session.new
    end

    # @return [String] Bunny mock version
    def version
      VERSION
    end

    # @return [String] AMQP protocol version
    def protocol_version
      AMQ::Protocol::PROTOCOL_VERSION
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bunny-mock-1.3.0 lib/bunny-mock.rb