To maintain my sanity, and to drive good code design, Racing on Rails has several sets of  tests.

After you've downloaded the code and run "rake racing_on_rails:bootstrap", you can run the unit and functional tests the standard Rails way: "rake" at the command line. These tests should always run at 100%; I run them before every commit, and they test just about everything.

The shameful exception: any test that parses Excel fails on Windows. This highlights a real problem—the old  ParseExcel library doesn't work on Windows—but the current development environment is OS X and the deployment environment is FreeBSD, so it hasn't affected me. The newer  Spreadsheet gem appears to work on Windows, but unfortunately, it's not a drop-in replacement for ParseExcel?.

There's also a suite of  Selenium tests, that test the application through a web browser. You can run these with "rake test:acceptance", or by starting up a server and manually starting the tests:

  ruby script/server -e test
  http://localhost:3000/selenium

All unit, functional, and Selenium tests run on every commit by the  CI build, using  CruiseControl.rb,  Selenium on Rails, Firefox 3, and  Xvfb on FreeBSD. They should also pass 100% on Safari and Firefox. They are more fragile than the unit and functional tests, though, and I don't routinely run them on Windows. There are different, perhaps better alternatives ( Selenium Remote Control,  Watir), but the current approach works well enough.