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-1.0.4 spec/regression/bad_frame_slicing_in_adapters_spec.rb
amq-client-1.0.3 spec/regression/bad_frame_slicing_in_adapters_spec.rb
amq-client-1.1.0.pre1 spec/regression/bad_frame_slicing_in_adapters_spec.rb
amq-client-1.0.2 spec/regression/bad_frame_slicing_in_adapters_spec.rb
amq-client-1.0.1 spec/regression/bad_frame_slicing_in_adapters_spec.rb
amq-client-1.0.0 spec/regression/bad_frame_slicing_in_adapters_spec.rb
amq-client-0.9.12 spec/regression/bad_frame_slicing_in_adapters_spec.rb
amq-client-0.9.11 spec/regression/bad_frame_slicing_in_adapters_spec.rb
amq-client-0.9.10 spec/regression/bad_frame_slicing_in_adapters_spec.rb
amq-client-0.9.9 spec/regression/bad_frame_slicing_in_adapters_spec.rb
amq-client-0.9.8 spec/regression/bad_frame_slicing_in_adapters_spec.rb
amq-client-0.9.7 spec/regression/bad_frame_slicing_in_adapters_spec.rb
amq-client-0.9.6 spec/regression/bad_frame_slicing_in_adapters_spec.rb
amq-client-0.9.5 spec/regression/bad_frame_slicing_in_adapters_spec.rb
amq-client-0.9.4 spec/regression/bad_frame_slicing_in_adapters_spec.rb
amq-client-1.0.0.pre2 spec/regression/bad_frame_slicing_in_adapters_spec.rb
amq-client-0.9.3 spec/regression/bad_frame_slicing_in_adapters_spec.rb
amq-client-1.0.0.pre1 spec/regression/bad_frame_slicing_in_adapters_spec.rb
amq-client-0.9.2 spec/regression/bad_frame_slicing_in_adapters_spec.rb
amq-client-0.9.1 spec/regression/bad_frame_slicing_in_adapters_spec.rb