Sha256: d8035400921aa2e135b44d1b194455b61b09fe40cdfd4abfe2ca933d201c9a27

Contents?: true

Size: 1.23 KB

Versions: 16

Compression:

Stored size: 1.23 KB

Contents

# encoding: utf-8

require "spec_helper"

describe AMQP::Channel, "#auto_recovery" do

  #
  # Environment
  #

  include EventedSpec::AMQPSpec
  include EventedSpec::SpecHelper


  default_options AMQP_OPTS
  default_timeout 2


  it "switches automatic recovery mode on" do
    ch = AMQP::Channel.new(AMQP.connection)
    ch.auto_recovery.should be_false
    ch.auto_recovery = true
    ch.auto_recovery.should be_true
    ch.auto_recovery = false
    ch.auto_recovery.should be_false

    done
  end
end




describe AMQP::Channel, "options hash" do

  #
  # Environment
  #

  include EventedSpec::AMQPSpec
  include EventedSpec::SpecHelper


  default_options AMQP_OPTS
  default_timeout 2


  it "can be passed as the 3rd constructor argument" do
    ch = AMQP::Channel.new(AMQP.connection, nil, :auto_recovery => true)
    ch.auto_recovery.should be_true
    ch.auto_recovery = false
    ch.auto_recovery.should be_false

    done
  end


  it "can be passed as the 2nd constructor argument" do
    ch = AMQP::Channel.new(AMQP.connection, :auto_recovery => true)
    ch.auto_recovery.should be_true
    ch.should be_auto_recovering
    ch.auto_recovery = false
    ch.auto_recovery.should be_false
    ch.should_not be_auto_recovering

    done
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

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