You’ve heard a colleague say “You’re all smart coders. You can figure out how my code works!” as an excuse to let less-than-clear code slip in. This is bunk, and here’s why.
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.