This presentation will show how to transform a Ruby application without tests into a well-spec’d (via rspec) system with good test coverage. The presentation teaches how to write “characterization tests” for Ruby systems, how to convert characterization tests into normal specifications, and how to refactor and add new functionality to the improved system. The code to be tested and refactored is the popular ‘flog’ tool written by seattle.rb’s Ryan “zenspider” Davis, which was originally written without tests. The presentation will show the exact manner in which tests were added, how the code was refactored, and what improvements arose in the process.
Rick Bradley is a founder of Nashville-based Ruby consultancy OG Consulting and the progenitor of the Nashville Dynamic Languages Group (a thinly veiled excuse to get like-minded geeks together over beer and coffee). He has presented at RailsConfs 2006 & 2008, and to a circle of somewhat reluctant friends and acquaintances. He contributes regularly to open source software and is a co-author of such obviously earth-shattering nuggets as object_daddy, shatnr, and acts_as_range.