Rails Testing Strategy

  • In an interview DHH goes into his workflow:
    • Fixtures
    • Minitest (Test/Unit)
    • Lots of Controller tests
    • Unit tests when doing something complicated
    • System tests when needed for testing flow
    • Runs Basecamp 3 test suite in ~ 2 mins
  • Jason Swett (the Rails Testing guy) has a book
    • Rspec
    • Model specs: always
    • System specs: always
    • Request: rarely (usually redundant to system specs)
    • Helper: rarely
    • View/Routing/Mailer/Job: never


Avatar of Author

Jamie Macey is a senior software engineer with over 15 years experience in the Ruby and Rails ecosystems, largely on the back-end.

Husband, father, gamer, and all-around geek. Ask about my latest 3d print, or toy software project.