Sha256: f6edbabbea0a966a17dfe1890e2bbd58605aadfcc972f4a3d6b5c13f7cb443c3

Contents?: true

Size: 983 Bytes

Versions: 1

Compression:

Stored size: 983 Bytes

Contents

@bunny
@in_memory
Feature: Destination Metadata
  Background:
    Given the following broker configuration:
    """ruby
    MessageDriver::Broker.define do |b|
      b.destination :my_queue, "my_queue", exclusive: true
    end
    """

  Scenario: Checking the message count when the queue is empty
    When I execute the following code:
    """ruby
    destination = MessageDriver::Broker.find_destination(:my_queue)
    expect(destination.message_count).to eq(0)
    """

    Then I expect to have no errors
    And I expect to find no messages on :my_queue

  @no_travis
  Scenario: Checking the message count when the queue has messages
    When I execute the following code:
    """ruby
    publish(:my_queue, "test message 1")
    publish(:my_queue, "test message 2")
    destination = MessageDriver::Broker.find_destination(:my_queue)
    expect(destination.message_count).to eq(2)
    """

    Then I expect to have no errors
    And I expect to find 2 messages on :my_queue

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
message-driver-0.1.0 features/destination_metadata.feature