Chapter 12Testing External Services
Weâve decided the one thing our project-management tool really needs is a bit of graphical spark. Specifically, weâve been asked to have usersâ Twitter avatars show up on the site attached to tasks they have completed. (Handily, Twitter has a Ruby gem thatâs not to hard to set up.) Since this is Rails 4 Test Prescriptions and not Rails 4 Connecting to Twitter Prescriptions, weâd like to be able to test our interaction with the Twitter API.
Unfortunately, interacting with a third-party web service introduces a lot of complexity to our testing. Connecting to a web service is slowâeven slower than the database connections weâve already tried to avoid. Plus, connection to a web service requires an ...
Get Rails 4 Test Prescriptions now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.