Sha256: e11f8379943a7301eee82c830c2b3f1cf362f3c3be1cf84d049c1a51502d7863

Contents?: true

Size: 1.03 KB

Versions: 18

Compression:

Stored size: 1.03 KB

Contents

@bunny
Feature: Publishing a Message within a Transaction
  Background:
    Given I am connected to the broker
    And I have a destination :publish_transaction with no messages on it

  Scenario: The block completes successfully
    When I execute the following code
    """ruby
    with_message_transaction do
      publish(:publish_transaction, "Transacted Message 1")
      publish(:publish_transaction, "Transacted Message 2")
    end
    """

    Then I expect to find the following 2 messages on :publish_transaction
      | body                 |
      | Transacted Message 1 |
      | Transacted Message 2 |

  Scenario: An error is raised inside the block
    When I execute the following code
    """ruby
    with_message_transaction do
      publish(:publish_transaction, "Transacted Message 1")
      raise "an error that causes a rollback"
      publish(:publish_transaction, "Transacted Message 2")
    end
    """

    Then I expect it to raise "an error that causes a rollback"
    And I expect to find no messages on :publish_transaction

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
message-driver-1.0.1 features/publishing_with_transactions.feature
message-driver-1.0.0 features/publishing_with_transactions.feature
message-driver-0.7.2 features/publishing_with_transactions.feature
message-driver-0.7.1 features/publishing_with_transactions.feature
message-driver-0.7.0 features/publishing_with_transactions.feature
message-driver-0.6.1 features/publishing_with_transactions.feature
message-driver-0.6.0 features/publishing_with_transactions.feature
message-driver-0.5.3 features/publishing_with_transactions.feature
message-driver-0.5.2 features/publishing_with_transactions.feature
message-driver-0.5.1 features/publishing_with_transactions.feature
message-driver-0.5.0 features/publishing_with_transactions.feature
message-driver-0.4.0 features/publishing_with_transactions.feature
message-driver-0.3.0 features/publishing_with_transactions.feature
message-driver-0.2.2 features/publishing_with_transactions.feature
message-driver-0.2.1 features/publishing_with_transactions.feature
message-driver-0.2.0 features/publishing_with_transactions.feature
message-driver-0.2.0.rc2 features/publishing_with_transactions.feature
message-driver-0.2.0.rc1 features/publishing_with_transactions.feature