29 Aug '16, 6pm

New article in our Community: Isolate Side Effects in #Ruby by @tom_dalling

Side effects are often slow IO operations, like writing to a disk or a socket. If you want to test these things, don’t expect your test suite to be snappy. Take a PostgreSQL database in a typical Rails application, for example. When database access is sprinkled through basically every single part of an application, almost every test is going to hit the database at some point, so it should be no surprise when the test suite is slow. On the other hand, if the majority of the tests are isolated, but a few of them hit the database, you would expect the test suite to be much faster.

Full article: https://semaphoreci.com/community/tutorials/isolate-side-...

Tweets