-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Description
Can you provide an example on how to raise Bunny::ConnectionClosedError and Bunny::TCPConnectionFailed errors. I'm having trouble getting these to fire.
Maybe something like:
it 'should route messages from exchanges' do
channel = BunnyMock.new.start.channel
xchg = channel.topic 'xchg.topic'
queue = channel.queue 'queue.test'
queue.bind xchg
allow(xchg).to receive(:publish).and_raise(Bunny::ConnectionClosedError)
xchg.publish 'Routed message', routing_key: '*.test'
expect(queue.message_count).to eq(1)
expect(queue.pop[:message]).to eq('Routed message')
endMetadata
Metadata
Assignees
Labels
No labels