I gave a presentation at the January 2013 Boston Ruby Project Night on “Getting Started with Rails Testing”.
This talk aims at understanding the development workflow while using TDD and the Red-Green-Refactor loop.
We look at the different test types that you can write in a Rails application
- Unit tests
- Controller tests
- Integration tests
We also look at some of the tools and frameworks that are available for testing, including RSpec, MiniTest, Test-Unit, Capybara, and FactoryGirl.
A simple example is used to show the test-driven development workflow. The code for the example is on github at https://github.com/mdenomy/expense_tracker.
The github repository uses branches to capture a series of snaphots in the test-driven-development workflow. See the Readme file for a list of the branches, or run the “git branch -a” command to see the full list from the terminal.