Measure your test performance with e.g. CI Reporter and refactor slow tests.
- Extract domain objects from your fat models. ActiveRecord is not your domain.
- Decouple code that doesn't follow the Single Responsibility Principle.
- Inject dependencies instead of referring to globals like
Rails
orUser
.
From my experience, tests that don't require "test_helper" reveal the coupling in your application.