Sha256: 506d960ed17c56416c9212806bfa7629b7e20d0f5c02176857ea3fe3b510b1ea

Contents?: true

Size: 712 Bytes

Versions: 28

Compression:

Stored size: 712 Bytes

Contents

# frozen_string_literal: true

module PubSubModelSync
  class MockGoogleService
    class MockStop
      def wait!
        true
      end
    end

    class MockSubscriber
      def start
        true
      end

      def stop
        @stop ||= MockStop.new
      end
      alias stop! stop
    end

    class MockSubscription
      def listen(*_args)
        @listen ||= MockSubscriber.new
      end
    end

    class MockTopic
      def subscription(*_args)
        @subscription ||= MockSubscription.new
      end
      alias subscribe subscription

      def publish(*_args)
        true
      end
    end

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

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
pub_sub_model_sync-0.5.7.1 lib/pub_sub_model_sync/mock_google_service.rb
pub_sub_model_sync-0.5.7 lib/pub_sub_model_sync/mock_google_service.rb
pub_sub_model_sync-0.5.6 lib/pub_sub_model_sync/mock_google_service.rb
pub_sub_model_sync-0.5.5 lib/pub_sub_model_sync/mock_google_service.rb
pub_sub_model_sync-0.5.4.1 lib/pub_sub_model_sync/mock_google_service.rb
pub_sub_model_sync-0.5.4 lib/pub_sub_model_sync/mock_google_service.rb
pub_sub_model_sync-0.5.3 lib/pub_sub_model_sync/mock_google_service.rb
pub_sub_model_sync-0.5.2 lib/pub_sub_model_sync/mock_google_service.rb
pub_sub_model_sync-0.5.1.1 lib/pub_sub_model_sync/mock_google_service.rb
pub_sub_model_sync-0.5.1 lib/pub_sub_model_sync/mock_google_service.rb
pub_sub_model_sync-0.5.0.1 lib/pub_sub_model_sync/mock_google_service.rb
pub_sub_model_sync-0.5.0 lib/pub_sub_model_sync/mock_google_service.rb
pub_sub_model_sync-0.4.2.1 lib/pub_sub_model_sync/mock_google_service.rb
pub_sub_model_sync-0.4.2 lib/pub_sub_model_sync/mock_google_service.rb
pub_sub_model_sync-0.4.1 lib/pub_sub_model_sync/mock_google_service.rb
pub_sub_model_sync-0.4.0 lib/pub_sub_model_sync/mock_google_service.rb
pub_sub_model_sync-0.3.1 lib/pub_sub_model_sync/mock_google_service.rb
pub_sub_model_sync-0.3.0 lib/pub_sub_model_sync/mock_google_service.rb
pub_sub_model_sync-0.2.4 lib/pub_sub_model_sync/mock_google_service.rb
pub_sub_model_sync-0.2.3 lib/pub_sub_model_sync/mock_google_service.rb