Sha256: ce34de96cd3257151e218530a38a161e13a09ec932efba7296c494479bee547a

Contents?: true

Size: 724 Bytes

Versions: 8

Compression:

Stored size: 724 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

      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

8 entries across 8 versions & 1 rubygems

Version Path
pub_sub_model_sync-0.4.2.1 lib/pub_sub_model_sync/mock_rabbit_service.rb
pub_sub_model_sync-0.4.2 lib/pub_sub_model_sync/mock_rabbit_service.rb
pub_sub_model_sync-0.4.1 lib/pub_sub_model_sync/mock_rabbit_service.rb
pub_sub_model_sync-0.4.0 lib/pub_sub_model_sync/mock_rabbit_service.rb
pub_sub_model_sync-0.3.1 lib/pub_sub_model_sync/mock_rabbit_service.rb
pub_sub_model_sync-0.3.0 lib/pub_sub_model_sync/mock_rabbit_service.rb
pub_sub_model_sync-0.2.4 lib/pub_sub_model_sync/mock_rabbit_service.rb
pub_sub_model_sync-0.2.3 lib/pub_sub_model_sync/mock_rabbit_service.rb