I am using isolated tests for all my classes except for models and feature’s specs. I do it because it’s fast. I do 444 specs in 30 seconds. I see all learn.thoughtbot’s specs are made with integration tests.
I think isolated tests are fasts but integration tests are simple.
What is you opinion on this subject. Do you prefer integration or isolation?
Integration tests are slow because it hit the database. I think a way to avoid the hit of database can be the best of both world. Is there a way to do this?
For Rails app I do not do tests in isolation because I do not know how to do it ;). I use integration (models with all dependencies) and feature specs (testing the app).
For my other pure Ruby project I test everything in isolation and I like it. The only drawback is that currently I use test doubles, but it can happen that they do not reflect real interface of doubled object.
I saw your projects. They are clean but it’s difficult to say how it can be done with a complex project because your applications seems to be small. I’m interested to see how you can manager services, form objects and all that kind of complex logic.