[ next ] [ prev ] [ contents ] XP-Cinti TDD Workshop

Conventions

I'll be presenting a lot of code and unit test output. Here are the conventions I'll follow.

Unit Test Code

The unit test code will be stored in a file named testnet.rb. Code excerpts from this file will be in a pale blue box. I'll use three dots "..." to indicated elided lines.

# file: testnet.rb
# Unit test code here

Ruby Code

The Ruby code will be stored in a file named net.rb. The code will appear in pale red box.

# file: net.rb
# Ruby code here

Ruby Comments: Since I expect that most readers will be unfamiliar with Ruby, I will add Ruby specific comments to the side like this as new constructs are introduced.

Unit Test Output

The output of running the unit tests will apper in next to a green or red bar. The green bar will indicate a successful unit test run. A red bar will indicate that the unit test has failed.

For example ...

  
-- Output for passing unit tests

and ...

  
-- Output for failing unit tests


[ next ] [ prev ] [ contents ] Copyright 2003 by Jim Weirich.
Some Rights Reserved