Sha256: 32799494e2e5cc38cf6f465cc81b800dfbe4b7dba393f78eb102c943b5c84973
Contents?: true
Size: 779 Bytes
Versions: 24
Compression:
Stored size: 779 Bytes
Contents
require "spec_helper" describe Bunny::Queue, "#delete" do let(:connection) do c = Bunny.new(:user => "bunny_gem", :password => "bunny_password", :vhost => "bunny_testbed") c.start c end after :all do connection.close end context "with a name of an existing queue" do it "deletes that queue" do ch = connection.create_channel q = ch.queue("") q.delete expect { q.delete }.to raise_error(Bunny::NotFound) ch.queues.size.should == 0 end end context "with a name of an existing queue" do it "raises an exception" do ch = connection.create_channel expect { ch.queue_delete("sdkhflsdjflskdjflsd#{rand}") }.to raise_error(Bunny::NotFound) end end end
Version data entries
24 entries across 24 versions & 1 rubygems