Sha256: f7fd49aae8dfdc3b7e00d0e2a5434217a08b71ccf2470d3aa59e7243316c2e31

Contents?: true

Size: 1.74 KB

Versions: 32

Compression:

Stored size: 1.74 KB

Contents

# encoding: binary

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

Version Path
amq-client-0.9.0 spec/regression/bad_frame_slicing_in_adapters_spec.rb
amq-client-0.9.0.pre2 spec/regression/bad_frame_slicing_in_adapters_spec.rb
amq-client-0.9.0.pre1 spec/regression/bad_frame_slicing_in_adapters_spec.rb
amq-client-0.8.7 spec/regression/bad_frame_slicing_in_adapters_spec.rb
amq-client-0.8.7.pre1 spec/regression/bad_frame_slicing_in_adapters_spec.rb
amq-client-0.8.6 spec/regression/bad_frame_slicing_in_adapters_spec.rb
amq-client-0.8.5 spec/regression/bad_frame_slicing_in_adapters_spec.rb
amq-client-0.8.4 spec/regression/bad_frame_slicing_in_adapters_spec.rb
amq-client-0.8.3 spec/regression/bad_frame_slicing_in_adapters_spec.rb
amq-client-0.8.2 spec/regression/bad_frame_slicing_in_adapters_spec.rb
amq-client-0.8.1 spec/regression/bad_frame_slicing_in_adapters_spec.rb
amq-client-0.8.0 spec/regression/bad_frame_slicing_in_adapters_spec.rb