Refactoring with an Apprentice Walk through a refactoring of Ruby on Rails test code and observe lessons in Rails idioms, setting up only necessary test data, and extracting methods.