spec/lib/adapters/rabbitmq_adapter_spec.rb in basquiat-1.4.0 vs spec/lib/adapters/rabbitmq_adapter_spec.rb in basquiat-1.5.0

- old
+ new

@@ -35,10 +35,12 @@ { connection: { hosts: [ENV.fetch('BASQUIAT_RABBITMQ_1_PORT_5672_TCP_ADDR') { 'localhost' }], port: ENV.fetch('BASQUIAT_RABBITMQ_1_PORT_5672_TCP_PORT') { 5672 } }, publisher: { persistent: true, session_pool: { size: 10 } } } end + before { Basquiat.configure { |c| c.connection = Bunny.new.tap(&:start) } } + it '#publish [enqueue a message 10 times concurrently]' do expect do threads = [] 10.times do @@ -46,9 +48,11 @@ end threads.each(&:join) end.not_to raise_error end + + after { Basquiat.configure { |c| c.connection = nil } } end end context 'listener' do it 'runs the rescue block when an exception happens' do