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