Exploration Through ExampleExample-driven development, Agile testing, context-driven testing, Agile programming, Ruby, and other things of interest to Brian Marick
|
Wed, 26 Feb 2003More on command lines and tests A faithful correspondent notes that my entry on command lines as refactored tests is incoherent. Let me explain the structure of the app. It's named Timeclock. It's a client-server app. There are two user interfaces, the GUI and the command line. Command line commands are just Ruby functions, and the command line is normally used through the Ruby interpreter. Now let's add the tests to the picture:
The top set tests the command line. Among
other things, they check that return values and exceptions from the
To make the However, my observation was that a goodly chunk of the test
utility methods would look a lot like the command line commands. The
command line commands can already be used in unit tests (namely
their own), so why not use them as utility routines when testing
the |
|