engineering perfection on rails

test driven development

This course will teach you how to test drive your Ruby code. The principles and techniques taught will, of course, be applicable in any other object oriented language.

We do understand that of late, BDD or behaviour driven development has become a popular buzzword in the Rails world. However, teaching test driven development in a two day course is a difficult matter without adding the additional layer of tooling and, more importantly, philosophy that underlies BDD.

At the end of this course you should be able to:

  • Understand the advantages and disadvantages of TDD
  • Stop thinking of tests as tests and start using them as requirement specifications
  • Use tests for more than simply protecting against regression bugs
  • Take the first steps toward using tests as a tool to design better code
  • Create a standard pure Ruby project including directory structure and Rakefile
  • Create builds that will run your tests
  • Maintain that build over time and use it to track various metrics like coverage and cyclomatic complexity
  • Identify various test smells that will flag problems in design
  • Understand the various test smells that will flag problems in design
  • Use RSpec, the tool we'll be using for this course, effectively

Like all other workshops we conduct, this workshop is structured as a series of hands-on 30 minute exercises, each concentrating on a particular topic. The attendee will build a real, working Ruby gem over the course of the two day session.

prerequisite: Ruby basics.