A
A
Anton Ivanov2017-01-18 06:06:52
Ruby on Rails
Anton Ivanov, 2017-01-18 06:06:52

How to check if a request was sent to an external service?

Hello.
There is a function that sends an alert to an external service. How can you check in an rspec test that this function has been called? Naturally, I can change the body of the function, the actual sending of the notification is already turned off by checking for Rails.env.test?
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Ivanov, 2017-01-18
@Fly3110

Thank you, the answer has been found.
https://relishapp.com/rspec/rspec-mocks/docs/basic...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question