Sha256: 06500802a311067f4c3fdf55c21806a703ca5fbc21aa682ed5eefa807ec8e683

Contents?: true

Size: 807 Bytes

Versions: 17

Compression:

Stored size: 807 Bytes

Contents

require "spec_helper"

describe "Any exchange" do

  #
  # Environment
  #

  let(:connection) { HotBunnies.connect }
  let(:channel)    { connection.create_channel }

  after :each do
    channel.close
    connection.close
  end


  #
  # Examples
  #

  it "can have an alternate exchange (a RabbitMQ-specific extension to AMQP 0.9.1)" do
    queue = channel.queue("", :auto_delete => true)

    fe    = channel.exchange("hot_bunnies.extensions.alternate_xchanges.fanout1")
    de    = channel.exchange("hot_bunnies.extensions.alternate_xchanges.direct1", :arguments => {
                               "alternate-exchange" => fe.name
                             })

    queue.bind(fe)
    de.publish("1010", :routing_key => "", :mandatory => true)

    mc, _ = queue.status
    mc.should == 1
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
hot_bunnies-1.5.0-java spec/integration/alternate_exchanges_spec.rb
hot_bunnies-1.4.0-java spec/integration/alternate_exchanges_spec.rb
hot_bunnies-1.4.0.pre4-java spec/integration/alternate_exchanges_spec.rb
hot_bunnies-1.4.0.pre3-java spec/integration/alternate_exchanges_spec.rb
hot_bunnies-1.4.0.pre2-java spec/integration/alternate_exchanges_spec.rb
hot_bunnies-1.4.0.pre1-java spec/integration/alternate_exchanges_spec.rb
hot_bunnies-1.3.8-java spec/integration/alternate_exchanges_spec.rb
hot_bunnies-1.3.7-java spec/integration/alternate_exchanges_spec.rb
hot_bunnies-1.3.6-java spec/integration/alternate_exchanges_spec.rb
hot_bunnies-1.3.5-java spec/integration/alternate_exchanges_spec.rb
hot_bunnies-1.3.4-java spec/integration/alternate_exchanges_spec.rb
hot_bunnies-1.3.3-java spec/integration/alternate_exchanges_spec.rb
hot_bunnies-1.3.2-java spec/integration/alternate_exchanges_spec.rb
hot_bunnies-1.3.1-java spec/integration/alternate_exchanges_spec.rb
hot_bunnies-1.2.2-java spec/integration/alternate_exchanges_spec.rb
hot_bunnies-1.2.1-java spec/integration/alternate_exchanges_spec.rb
hot_bunnies-1.2.0-java spec/integration/alternate_exchanges_spec.rb