Sha256: 5051383ce90ab23f27870fed9147645922a919fccc06746acafbb1e0b02e1285
Contents?: true
Size: 904 Bytes
Versions: 2
Compression:
Stored size: 904 Bytes
Contents
require "spec_helper" describe Bunny::Channel, "#prefetch" do let(:connection) do c = Bunny.new(:user => "bunny_gem", :password => "bunny_password", :vhost => "bunny_testbed") c.start c end after :each do connection.close end context "with a positive integer < 65535" do it "sets that prefetch level via basic.qos" do ch = connection.create_channel expect(ch.prefetch(10)).to be_instance_of(AMQ::Protocol::Basic::QosOk) end end context "with a positive integer > 65535" do it "raises an ArgumentError" do ch = connection.create_channel expect { ch.prefetch(100_000) }.to raise_error(ArgumentError) end end context "with a negative integer" do it "raises an ArgumentError" do ch = connection.create_channel expect { ch.prefetch(-2) }.to raise_error(ArgumentError) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
bunny-2.0.0.rc2 | spec/higher_level_api/integration/basic_qos_spec.rb |
bunny-2.0.0.rc1 | spec/higher_level_api/integration/basic_qos_spec.rb |