Sha256: f8534898fd2a6dea7cb242837ebcd577061f9152721b897be48a946aea484b4c

Contents?: true

Size: 749 Bytes

Versions: 1

Compression:

Stored size: 749 Bytes

Contents

# frozen_string_literal: true

module PubSubModelSync
  class MockRabbitService
    class MockTopic
      def publish(*_args)
        true
      end
    end

    class MockQueue
      def bind(*_args)
        true
      end

      def subscribe(*_args)
        true
      end

      def name
        'name'
      end
    end

    class MockChannel
      def queue(*_args)
        @queue ||= MockQueue.new
      end
      alias fanout queue

      def topic(*_args)
        @topic ||= MockTopic.new
      end

      def close
        true
      end
    end

    def create_channel(*_args)
      @create_channel ||= MockChannel.new
    end
    alias channel create_channel

    def start
      true
    end

    def close
      true
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pub_sub_model_sync-0.5.0 lib/pub_sub_model_sync/mock_rabbit_service.rb