If you bind a queue to an exchange multiple times, then publish a message to the exchange, the expectation is to only receive one message. This can be seen in bunny here:
It only creates a new binding if the binding doesn't already exist. The Bunny Mock gem however doesn't perform this check, so when the queue is bound multiple times, if we perform publish, the message count is wrong.
If you bind a queue to an exchange multiple times, then publish a message to the exchange, the expectation is to only receive one message. This can be seen in bunny here:
@bindings.push(binding) unless @bindings.include?(binding)
It only creates a new binding if the binding doesn't already exist. The Bunny Mock gem however doesn't perform this check, so when the queue is bound multiple times, if we perform publish, the message count is wrong.