Both topic and fanout exchanges can be redeclared and return the same
mock. It does not appear to be true for direct exchanges.
I ran the specs and noted from the specdoc that direct exchanges
aren't mentioned for MockBroker or MockExchange. I've edited the
specdoc output and included it below to highlight what I mean.
Moqueue::MockBroker
- should keep a list of named queues
- should reset itself
- should keep a list of topic exchanges
- should keep a list of fanout queues
Moqueue::MockExchange
- should emulate topic exchanges
- should register new topic exchanges with the mock broker
** - should return a previously created topic exchange when asked to
create a new one with the same topic
- should register new fanout exchanges with the MockBroker
** - should return the exact same fanout exchange if creating one with
an identical name
Should I fork the repository and add this functionality for direct
exchanges or would I be wrong to do so?
cr