Sha256: 13eedb1c0eed5d9a8471190ab5dff2c0c503fb79c02ee8b7fbd7d007b3d49a88

Contents?: true

Size: 616 Bytes

Versions: 30

Compression:

Stored size: 616 Bytes

Contents

require "spec_helper"

describe Bunny::Channel, "#open" do
  before :all do
    @connection = Bunny.new(:user => "bunny_gem", password:  "bunny_password", :vhost => "bunny_testbed")
    @connection.start
  end

  after :all do
    @connection.close if @connection.open?
  end


  it "properly resets channel exception state" do
    ch = @connection.create_channel

    begin
      ch.queue("bunny.tests.does.not.exist", :passive => true)
    rescue Bunny::NotFound
      # expected
    end

    # reopen the channel
    ch.open

    # should not raise
    q = ch.queue("bunny.tests.my.queue")
    q.delete
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
bunny-2.8.1 spec/issues/issue83_spec.rb
bunny-2.9.0 spec/issues/issue83_spec.rb
bunny-2.7.3 spec/issues/issue83_spec.rb
bunny-2.8.0 spec/issues/issue83_spec.rb
bunny-2.7.2 spec/issues/issue83_spec.rb
bunny-2.7.1 spec/issues/issue83_spec.rb
bunny-2.7.0 spec/issues/issue83_spec.rb
bunny-2.6.6 spec/issues/issue83_spec.rb
bunny-2.6.5 spec/issues/issue83_spec.rb
bunny-2.6.4 spec/issues/issue83_spec.rb