Sha256: 7a895dc8d2ccc34c4449196a9a7547b1a8baf8384a497ddd9e1f33837c63444f
Contents?: true
Size: 1.5 KB
Versions: 5
Compression:
Stored size: 1.5 KB
Contents
# encoding: utf-8 require 'spec_helper' describe AMQP do # # Environment # include EventedSpec::AMQPSpec default_timeout 5 # # Examples # context "when queue is redeclared with different attributes" do let(:name) { "amqp-gem.nondurable.queue" } let(:options) { { :durable => false, :exclusive => true, :auto_delete => true, :arguments => {}, :passive => false } } let(:different_options) { { :durable => true, :exclusive => true, :auto_delete => true, :arguments => {}, :passive => false} } let(:irrelevant_different_options) { { :durable => false, :exclusive => true, :auto_delete => true, :arguments => {}, :passive => false, :header => {:random => 'stuff' } } } it "should raise AMQP::IncompatibleOptionsError for incompatable options" do channel = AMQP::Channel.new channel.on_error do |ch, close| @callback_fired = true end channel.queue(name, options) expect { channel.queue(name, different_options) }.to raise_error(AMQP::IncompatibleOptionsError) done end it "should not raise AMQP::IncompatibleOptionsError for irrelevant options" do channel = AMQP::Channel.new channel.on_error do |ch, close| @callback_fired = true end channel.queue(name, options) expect { channel.queue(name, irrelevant_different_options) }.to_not raise_error(AMQP::IncompatibleOptionsError) done end end end # describe AMQP
Version data entries
5 entries across 5 versions & 1 rubygems