Rails Testing Primer
Every programmer is familiar with some kind of testing. You click on your application or web pages to see if it does what you expect. You fill out your forms with fake data and see if it gets stored successfully in the database. But that type of testing becomes a tedious and repetitive task. You know who is really good at tedious and repetitive tasks? Computers. That’s why it’s much better to program tests the computer can perform for you and save yourself all that clicking. When it comes to testing, computers are faster, more accurate, more comprehensive and don’t complain nearly as much. And Ruby on Rails makes testing easy to add to any project.
Gregory Brown at O’Reilly has just posted a primer, “Rails Testing: Not Just for the Paranoid”, on implementing testing (Unit, Functional, and Integration) in Ruby on Rails.
If you are looking for more on testing, the Rails manual also gives a good guide to testing in Chapter 9 and nubyonrails.com has a Testing Cheat Sheet that’s helpful for remembering the testing syntax.
