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

Minitest

has a style guide