iParadigms/walker — pull request #93 by pchristopher1275 (2014-11-20 21:55:14+00:00)
Title: Fetcher retest

The bullet this PR addresses is:

* There has grown to be a decent amount of repetition in fetcher_test.go; see if we can consolidate some test preparation steps into helpers, or possibly merge some tests to be more table driven (granted, though, that many fetcher tests won't allow for this because they do unique things like use misbehaving transports; it's okay for those to stand out)

This is a pretty big patch. Essentially the only thing I did was to write runFetcher which sets up the mocks and runs the fetcher which is a preamble to almost every test in this file, AND add {Link,Host,Test}Spec structs to describe what runFetcher should do. But then, each test has to have a big chunk of code removed, and a tests TestSpec created. So it ends up being a pretty big patch. As a general rule I favored making tests simpler at the expense of making runFetcher more complicated (in terms of config options).