Sha256: 7c7fbf09cf45b265806abf333eefec5b064508f7efcb48fcfb869c371148ccf7

Contents?: true

Size: 552 Bytes

Versions: 4

Compression:

Stored size: 552 Bytes

Contents

require 'test_helper'

module Alondra

  class MessageQueueClientTest < ActiveSupport::TestCase

    test "a sync client uses a sync zeromq context" do
      context = SyncMessageQueueClient.new.send :context
      assert context.class == ZMQ::Context
    end

    test "an async client uses an async zeromq context" do
      context = nil

      assert EM.reactor_running?

      EM.schedule do
        context = MessageQueueClient.instance.send :context
      end

      sleep(0.1)

      assert context.class == EM::ZeroMQ::Context
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
alondra-0.1.1 test/models/message_queue_client_test.rb
alondra-0.1.0 test/models/message_queue_client_test.rb
alondra-0.0.4 test/models/message_queue_client_test.rb
alondra-0.0.3 test/models/message_queue_client_test.rb