facebook/xctool — pull request #40 by fpotter (2013-05-16 08:01:21+00:00)
Title: a bunch of cleanup in the unit tests.

I'm trying to make it easier to test the more complex operations where... xctool spawns off a bunch of NSTask(s); we have to verify that those NSTasks were started with the right launchPath, arguments, and environment; and we have make those NSTasks pretend to return some fake output.

Previously we did this with the `TaskInstance()` and `ReturnFakeTasks()` functions, but it would get pretty hairy after you had to verify more than a couple tasks.

Now we'll primarily use `FakeTaskManager`. It does some nice things like automatically substituting FakeTask(s) for NSTask(s), and giving you a nice way to make FakeTask(s) pretend to return specific output. But, what makes testing simpler is that, e.g., if xctool invokes 7 tasks but your test only cares about 4 of them, then you only have to setup/verify 4 of them.

Here's an example of how things changed --
https://github.com/facebook/xctool/commit/7fd5802c25f8187c3357193bc88d929361579cae#L1R209