Sha256: 0cc186eecd7c2a1eb02c9653ef722ee1c8ecf63b1c6e422183483f2980cd990e
Contents?: true
Size: 889 Bytes
Versions: 6
Compression:
Stored size: 889 Bytes
Contents
require "spec_helper" describe Bunny::Channel, "#nack" 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 if connection.open? end subject do connection.create_channel end context "with requeue = false" do it "rejects a message" do q = subject.queue("bunny.basic.nack.with-requeue-false", :exclusive => true) x = subject.default_exchange x.publish("bunneth", :routing_key => q.name) sleep(0.5) q.message_count.should == 1 delivery_info, _, content = q.pop(:ack => true) subject.nack(delivery_info.delivery_tag, false, false) sleep(0.5) q.message_count.should == 0 subject.close end end context "with multiple = true" do it "rejects multiple messages" end end
Version data entries
6 entries across 6 versions & 1 rubygems