A Guide to Testing Rails Applications

This article is for fellow Rubyists looking for more information on test writing and how that fits into Ruby On Rails. If you're new to test writing or experienced with test writing, but not in Rails, hopefully you'll gain some practical tips and insight on successful testing. Assumptions

Just so we're all on the same page here, I'm making a few assumptions about you.

  • You've got Ruby installed and know how to run a Ruby script.

  • You've got Rails installed

  • You've created a basic Rails application with 1 controller and 1 model.

If you haven't accomplished all of the above, you might be jumping ahead of yourself. Check out www.rubyonrails.org for some great beginner's tutorials.

Make sure you have Ruby 1.8.6 or greater and Rails 2.0 or greater.

Also, hats off to xal (and others) for creating this site.