Sha256: ba491aaf2bb7e114ab2694b270c4e5d43fdc17e10145b2586624efc968e00d38

Contents?: true

Size: 687 Bytes

Versions: 11

Compression:

Stored size: 687 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe "Server-named", AMQP::Queue do

  #
  # Environment
  #

  include EventedSpec::AMQPSpec

  default_timeout 5

  amqp_before do
    @channel = AMQP::Channel.new
  end


  #
  # Examples
  #


  it "delays binding until after queue.declare-ok arrives" do
    mailbox  = []
    exchange = @channel.fanout("amq.fanout")
    input    = "Independencia de resolución, ¿una realidad en Mac OS X Lion?"

    @channel.queue("", :auto_delete => true).bind(exchange).subscribe do |header, body|
      mailbox << body
    end

    delayed(0.3) {
      exchange.publish(input)
    }

    done(0.5) {
      mailbox.size.should == 1
    }
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
amqp-0.8.0.rc13 spec/integration/declare_and_immediately_bind_a_server_named_queue_spec.rb
amqp-0.8.0.rc12 spec/integration/declare_and_immediately_bind_a_server_named_queue_spec.rb
amqp-0.8.0.rc11 spec/integration/declare_and_immediately_bind_a_server_named_queue_spec.rb
amqp-0.8.0.rc10 spec/integration/declare_and_immediately_bind_a_server_named_queue_spec.rb
amqp-0.8.0.rc9 spec/integration/declare_and_immediately_bind_a_server_named_queue_spec.rb
amqp-0.8.0.rc8 spec/integration/declare_and_immediately_bind_a_server_named_queue_spec.rb
amqp-0.8.0.rc7 spec/integration/declare_and_immediately_bind_a_server_named_queue_spec.rb
amqp-0.8.0.rc6 spec/integration/declare_and_immediately_bind_a_server_named_queue_spec.rb
amqp-0.8.0.rc5 spec/integration/declare_and_immediately_bind_a_server_named_queue_spec.rb
amqp-0.8.0.rc4 spec/integration/declare_and_immediately_bind_a_server_named_queue_spec.rb
amqp-0.8.0.rc3 spec/integration/declare_and_immediately_bind_a_server_named_queue_spec.rb