Sha256: 211687729cb3d2cda6f5e8b303c0bd61dbd39506c2db2fff7fe7659dcbe04526
Contents?: true
Size: 1.72 KB
Versions: 32
Compression:
Stored size: 1.72 KB
Contents
require 'spec_helper' require 'integration/coolio/spec_helper' require 'integration/eventmachine/spec_helper' describe "AMQ::Client::CoolioClient", :nojruby => true do include EventedSpec::SpecHelper default_timeout 1 let(:message) { "Message with xCE \xCE" } it "should receive the message with xCE byte in it without errors" do coolio_amqp_connect do |client| channel = AMQ::Client::Channel.new(client, 1) channel.open do end queue = AMQ::Client::Queue.new(client, channel) queue.declare(false, false, false, true) queue.bind("amq.fanout") queue.consume(true) do |_, consumer_tag| queue.on_delivery do |method, header, payload| @received_message = payload done end exchange = AMQ::Client::Exchange.new(client, channel, "amq.fanout", :fanout) exchange.publish(message) end end @received_message.should == message end end describe AMQ::Client::EventMachineClient do include EventedSpec::SpecHelper default_timeout 1 let(:message) { "Message with xCE \xCE" } it "should receive the message with xCE byte in it without errors" do em_amqp_connect do |client| channel = AMQ::Client::Channel.new(client, 1) channel.open do end queue = AMQ::Client::Queue.new(client, channel) queue.declare(false, false, false, true) queue.bind("amq.fanout") queue.consume(true) do |_, consumer_tag| queue.on_delivery do |method, header, payload| @received_message = payload done end exchange = AMQ::Client::Exchange.new(client, channel, "amq.fanout", :fanout) exchange.publish(message) end end @received_message.should == message end end
Version data entries
32 entries across 32 versions & 1 rubygems