Sha256: c2b90e4b73da7584e286fd0e609bc533fd9ac6c5a7d6e7b03a3a6faee298447a

Contents?: true

Size: 473 Bytes

Versions: 18

Compression:

Stored size: 473 Bytes

Contents

# encoding: utf-8

require "spec_helper"

describe AMQP::Session, "#close(&callback)" do
  include EventedSpec::AMQPSpec

  it "takes a callback which will run when we get back connection.close-ok" do
    @events = []

    c = AMQP.connect do |session|
      @events << :open_ok
      session.close do |session, close_ok|
        @events << :close_ok
      end
    end

    done(0.3) {
      c.should be_closed
      @events.should == [:open_ok, :close_ok]
    }
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
amqp-1.8.0 spec/integration/connection_close_spec.rb
amqp-1.7.0 spec/integration/connection_close_spec.rb
amqp-1.6.0 spec/integration/connection_close_spec.rb
amqp-1.5.3 spec/integration/connection_close_spec.rb
amqp-1.5.2 spec/integration/connection_close_spec.rb
amqp-1.5.1 spec/integration/connection_close_spec.rb
amqp-1.5.0 spec/integration/connection_close_spec.rb
amqp-1.4.2 spec/integration/connection_close_spec.rb
amqp-1.4.1 spec/integration/connection_close_spec.rb
amqp-1.4.0 spec/integration/connection_close_spec.rb
amqp-1.3.0 spec/integration/connection_close_spec.rb
amqp-1.2.1 spec/integration/connection_close_spec.rb
amqp-1.2.0 spec/integration/connection_close_spec.rb
amqp-1.1.8 spec/integration/connection_close_spec.rb
amqp-1.1.7 spec/integration/connection_close_spec.rb
amqp-1.1.6 spec/integration/connection_close_spec.rb
amqp-1.1.5 spec/integration/connection_close_spec.rb
amqp-1.1.4 spec/integration/connection_close_spec.rb