arempe93 / bunny-mock

A mock client for RabbitMQ modeled after the Bunny client in ruby
http://www.rubydoc.info/github/arempe93/bunny-mock
MIT License
44 stars 37 forks source link

Topic queues don't populate #9

Closed dsandstrom closed 8 years ago

dsandstrom commented 8 years ago

I can't get a queue to receive messages. I've tried the latest bunny/bunny-mock. However, I need to use bunny v1.4x and bunny-mock v1.x in my app.

I've tried to run your example test and it fails:

it 'should route messages from exchanges' do
  channel = BunnyMock.new.start.channel

  xchg = channel.topic 'xchg.topic'
  queue = channel.queue 'queue.test'

  xchg.publish 'Routed message', routing_key: '*.test'

  expect(queue.message_count).to eq(1)
  expect(queue.pop[:message]).to eq('Routed message')
end

Here is an example app that fails for me: https://github.com/dsandstrom/bunny_mock_test/blob/master/spec/models/bunny_spec.rb.

arempe93 commented 8 years ago

I'll clone and look at this sometime today

arempe93 commented 8 years ago

hey @dsandstrom - seems to have been another typo in the readme :smile:

the queue was never bound to the exchange before the message was published in the example.

dsandstrom commented 8 years ago

Thanks for looking into this so quickly.

On Fri, Apr 8, 2016, 7:27 AM Andrew Rempe notifications@github.com wrote:

hey @dsandstrom https://github.com/dsandstrom - seems to have been another typo in the readme [image: :smile:]

the queue was never bound to the exchange before the message was published in the example.

— You are receiving this because you were mentioned.

Reply to this email directly or view it on GitHub https://github.com/arempe93/bunny-mock/issues/9#issuecomment-207452264