I'm afraid that's not enough information to suggest much.
Assuming "amqp" means "amqp gem" here, the library invokes the provided block the way you would expect.
I don't see how it would interfere with mocking or stubbing.
With Bunny, the easiest way to test is by using consumer objects [1] which make mocking and stubbing as easy as with any other code.