specs for 3rd party api calls from amqp

5 views
Skip to first unread message

Sonal Bhanawat

unread,
Jun 12, 2019, 2:36:44 PM6/12/19
to Ruby RabbitMQ libraries
Hi,
I am trying to write a spec for 3rd party services, being called from the amqp, but even after mocking the api request, the 3rd party api is getting called.Any help to resolve the same would be appreciated.
Thanks.

Michael Klishin

unread,
Jun 12, 2019, 2:40:30 PM6/12/19
to Ruby RabbitMQ libraries
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.

Reply all
Reply to author
Forward
0 new messages