rspec/rspec-core — pull request #1192 by benhoskings (2013-11-20 04:49:25+00:00)
Title: Refactor CommandLine.run to allow it to be more cleanly customised

This refactor makes two changes, both of which are useful from gems like test-queue.

- It separates spec setup and spec running into their own methods, making them callable separately. This is useful because in test-queue and its ilk, the setup is done once in the master, but the specs are run in each worker.

- It parameterises the list of specs to be run. This makes customising that list clean (in the test-queue case, passing an iterator that reads example groups from a socket).

(This patch doesn't change any externally called methods.)

What does everyone think -- would this be a reasonable change?