Reputation: 592
I've seen a lot of posts of how to mock external service requests during tests to improve test suite's speed and make them functional even without connection using gems like Webmock or VCR.
Now I have a route that gets called FROM an external service. i.e the external service POSTs to my app. How could I mock that?
Upvotes: 0
Views: 168
Reputation: 3207
Now I have a route that gets called FROM an external service. i.e the external service POSTs to my app.
This means your application provides a public API through one of your controller. To test the public API, you simply test the corresponding action in your controller as you always do when testing controllers.
Here's a reference.
Upvotes: 1