Hacker News new | ask | show | jobs
by doktrin 4844 days ago
> First I tried testing models and controllers, skipping views. Now I use integration tests with Capybara because it effectively tests the whole stack without writing redundant test code.

Does this mean you primarily rely on integration tests at the exclusion of model unit tests?

If that's the case, I'm of the opinion you would be well served by revisiting your unit tests. Controller tests are kinda taken care of by integration tests, but you won't get solid coverage of your models with integration tests alone.

At a minimum, model unit + integration (skipping controllers), IMHO. If for no other reason than running an integration test suite can be time consuming, and you don't always need your feedback loop to be that long.

1 comments

I do integration tests + model tests