spec/issues/issue141_spec.rb in bunny-2.6.3 vs spec/issues/issue141_spec.rb in bunny-2.6.4

- old
+ new

@@ -1,10 +1,10 @@ require "spec_helper" describe "Registering 2nd exclusive consumer on queue" do before :all do - @connection = Bunny.new(:user => "bunny_gem", :password => "bunny_password", :vhost => "bunny_testbed") + @connection = Bunny.new(:user => "bunny_gem", password: "bunny_password", :vhost => "bunny_testbed") @connection.start end after :each do @connection.close if @connection.open? @@ -17,16 +17,16 @@ ch1 = @connection.create_channel ch2 = @connection.create_channel q1 = ch1.queue("", :auto_delete => true) q2 = ch2.queue(q1.name, :auto_delete => true, :passive => true) - c1 = q1.subscribe(:exclusive => true) do |_, _, payload| + c1 = q1.subscribe(exclusive: true) do |_, _, payload| xs << payload end sleep 0.1 expect do - q2.subscribe(:exclusive => true) do |_, _, _| + q2.subscribe(exclusive: true) do |_, _, _| end end.to raise_error(Bunny::AccessRefused) expect(ch1).to be_open expect(ch2).to be_closed