How to Test Ruby Code That Depends on External APIs
06-Aug-2020 1451
Few things are more frustrating than slow, flaky test suites. You're ready to deploy, wait 20 minutes for CI to run, only to find that a test failure in code you've never touched is blocking you. You dig into the source and find the problem: an external API call. It works (slowly) most of the time. But sometimes the network glitches and it fails. What do you do? In this article, José Manuel shows us several techniques for removing external API dependencies from our tests.
How to Test Ruby Code That Depends on External APIs #ruby #rubydeveloper #rubyonrails #Depends #External #apis #code #test https://www.rubyonrails.ba/link/how-to-test-ruby-code-that-depends-on-external-apis