Creating Part 2: Unit Tests and Cow Files

Part two in my “live”-style screencast series is now available! Watch me code up a small web app from scratch using test-driven development.

In this hour-long episode, I switch from integration testing to unit testing in order to drive out some more features for the Sinatra-based web service I’ve been building. You’ll see me:

  • Use the “hub” gem to interact with GitHub.
  • Talk about the decision point to drop from integration to unit testing.
  • Use IO.popen to pipe text through an external process.
  • Isolate tests for filesystem interaction using simple dependency injection.
  • Use Enumerable#each_cons and enumerators to identify a sub-sequence in an Array.
  • Use the Pathname standard library.
  • …and more!

Here’s a five-minute preview:

If that has piqued your interest, the whole episode is available for immediate purchase.

UPDATE: The entire “Making of Cowsays” series is now available as a single video from TekPub!