Sha256: 7e383a0f134e6e414e7cbe37d322908385baf1b898868e63b035f8972821e31b

Contents?: true

Size: 1.05 KB

Versions: 17

Compression:

Stored size: 1.05 KB

Contents

require "spec_helper"

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

  after :each do
    channel.close
    connection.close
  end

  it "should bind two exchanges using exchange instances" do
    source =       channel.exchange("hot_bunnies.spec.exchanges.source", :auto_delete => true)
    destianation = channel.exchange("hot_bunnies.spec.exchanges.destination", :auto_delete => true)

    queue = channel.queue("", :auto_delete => true)
    queue.bind(destianation)

    destianation.bind(source)
    source.publish("")
    queue.get.should_not be_nil
  end

  it "should bind two exchanges using exchange name" do
    source =       channel.exchange("hot_bunnies.spec.exchanges.source", :auto_delete => true)
    destianation = channel.exchange("hot_bunnies.spec.exchanges.destination", :auto_delete => true)

    queue = channel.queue("", :auto_delete => true)
    queue.bind(destianation)

    destianation.bind(source.name)
    source.publish("")
    queue.get.should_not be_nil
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

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