redding/dat-tcp — pull request #42 by jcredding (2014-06-20 16:30:05+00:00)
Title: Add a `ServerSpy` for testing

This adds a `ServerSpy` that has the same interface as a
`Server` but doesn't use a real TCP server or do any kind of
processing connections. The class acts as a spy and will store
off the calls made to it. This is useful for dependency injecting
into tests to get the interface of a server without trying to
work with a real TCP server. It also allows testing what calls
were made to it to ensure a DatTCP server is being built as
expected.

This also sets up a factory for the tests using asserts factory.
This should be used to help generate random data.

@te