RailsConf 2016 - Foreign API Simulation with Sinatra by Konstantin Tennhard

795 views · Published 29 May 2016 · 28:54 · Indexed 26 October 2026

Channel: Confreaks · 2016 · Science & Technology

Watch on YouTube

Foreign API Simulation with Sinatra by Konstantin Tennhard

Nowadays, we often rely on third party services that we integrate into our product, instead of building every aspect of an application. In many cases, well written API clients exist, but on occasion you run into the issue that there isn't a ready to use client or it simply doesn't fit your needs. How do you write a good API client and more importantly how do you test it without hitting the remote API. So far, the standard approach has been replaying requests with VCR or stubbing them with Webmock. There is a third option: simulating foreign APIs with Sinatra from within your test suite!

Help us caption & translate this video!

http://amara.org/v/JvLq/

More from this channel