teaminsight/addbuild — pull request #5 by kellyredding (2012-07-18 19:57:17+00:00)
Title: implementation of the `Build` design

## Purpose

This implements the default `Build` api and design. A build adds action instances to its actions collection using the `action` method. Given a host, a build can run or undo itself.

## Design

A build needs just three methods defined:

* `action`: accepts a single action instance and adds it to a collection of actions
* `run`: given a host instance, applies the host to its actions and iterates over them in order, calling their `run` methods
* `undo`: given a host instance, applies the host to its actions and iterates over them in reverse order, calling their `undo` methods

## Result

This allows your to define actions on a build. You can then run or undo those actions on any given host instance. This handles hooking up the host with each action and executing the proper run or undo logic. There aren't any logic tests right now, just api regression type tests. Later, when the host stuff is more defined, it will be good to add in a host double and test that the actions are run appropriately.