RubyFlow The Ruby and Rails community linklog

How to Test Ruby Code That Depends on External APIs

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. https://www.honeybadger.io/blog/ruby-external-api-test/

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in