How we test Rails applications
We use RSpec feature and specs heavily,
controller and view specs more judiciously,
FactoryBot for test data,
JavaScript integration specs with Poltergeist or Capybara Webkit,
like test doubles and test spies but not test mocks,
and we stub external requests with Webmock.
thoughtbot