3.6.2 Guard 3.6.3 Spork

One annoyance associated with using the rspec command is having to
switch to the command line and run the tests by hand. (A second
annoyance, the slow start-up time of the test suite, is addressed in
Section 3.6.3.) In this section, we’ll show how to use Guard to automate
the running of the tests. Guard monitors changes in the filesystem so
that, for example, when we change the static_pages_spec.rb file only
those tests get run. Even better, we can configure Guard so that when,
say, the home.html.erb file is modified, the static_pages_spec.rb
automatically runs.

When running bundle exec rspec, you may have noticed that it takes
several seconds just to start running the tests, but once they start
running they finish quickly. This is because each time RSpec runs the
tests it has to reload the entire Rails environment. The Spork test
server13 aims to solve this problem. Spork loads the environment once,
and then maintains a pool of processes for running future tests. Spork
is particularly useful when combined with Guard (Section 3.6.2).