Sha256: 9af3bcad55200e3eb5f146f446ffc4b1267a8d5a81d5b229b2e1a4854f2ef692
Contents?: true
Size: 937 Bytes
Versions: 13
Compression:
Stored size: 937 Bytes
Contents
require "spec_helper" describe Bunny::Queue, "backwards compatibility API" do let(:connection) do c = Bunny.new c.start c end context "when queue name is specified" do let(:name) { "a queue declared at #{Time.now.to_i}" } it "declares a new queue with that name" do q = Bunny::Queue.new(connection, name) q.name.should == name end end context "when queue name is passed on as an empty string" do it "uses server-assigned queue name" do q = Bunny::Queue.new(connection, "") q.name.should_not be_empty q.name.should =~ /^amq.gen.+/ q.should be_server_named q.delete end end context "when queue name is completely omitted" do it "uses server-assigned queue name" do q = Bunny::Queue.new(connection) q.name.should_not be_empty q.name.should =~ /^amq.gen.+/ q.should be_server_named q.delete end end end
Version data entries
13 entries across 13 versions & 1 rubygems