Install RSpec for automated testing

I need some automated tests to support me in refactoring.  The Rails
default Test::Unit tests are currently in place, but I'm more familiar
with rspec, and no effort has been invested in Test::Unit yet.  Also,
I like how rspec can output documentation of coverage (specdoc) that
reads like English.

Make the following changes:

* Remove test/
* Add rspec-rails to Gemfile
* Run bundle install
* Run rails generate rspec:install, which adds .rspec and
  spec/spec_helper.rb
Install Capybara gem for automated integration testing

My first tests will be end-to-end tests.  Unfortunately Rails
integration tests make it hard to test forms: it allows you to
accidentally "submit" a form with fields that don't exist.  Capybara
addresses that problem, testing the form itself and the form action in
one step.

Install and configure Capybara.
Add feeder spec and fix HTML nesting and

constructor

I want a test for the FeederController so I can refactor.

Add a failing test for the feed action, and then make it pass:

* Inject SerialPort mock to isolate test from real Serial port to
  fix exception on serial port access
* Fix indentation of application layout so that head and body are
  nested within the top-level html tag to fix HTML parsing error
* Call super in the FeederController's initialize method so that the
  application layout is used, which allows the test to use the "Fed!"
  flash as an indication of test success
Add passing specs for #starve and #dose actions for completeness

We have a spec for #feed, but not complete coverage yet.

Add specs for the remaining actions so we have complete coverage.
Move Pump model to its own file

The Pump model is currently living right in the FeederController file.
This is a bit awkward because it clutters the FeederController file.
Down the road, if the pump is used in another file, it'll also make it
hard to autoload the Pump model.

Move the Pump model to app/models.  Even though it does not use
ActiveRecord, it is definitely part of the model layer.
Create a SimpleSerialPort wrapper for SerialPort

I need to mock this boundary of the application.  Best practice says that
I should only mock APIs owned by the application.  Also, the interface of a
SerialPort is far too complex to faithfully mock.

Wrap this vendor library with an interface owned by the application, one
which is far simpler.
Allow the SimpleSerialPort spec to run without

booting Rails

Rails takes a long while to boot up -- serveral seconds -- and it will
take even longer once we have more gems and plugins installed.
Sometimes I run specs a few times per minute when I'm developing.
That Rails boot time can really add up.  Usually I'm just running one
example, or one spec file, so the specs themselves don't take very
long, and the Rails boot time dominates.

Use a separate spec helper file for unit tests that don't need to load
all of Rails.  This is a bit experimental.  It's an approach advocated
by folks like Corey Haines.  It cuts runtime of a single example by
about 75% right now.
Remove serial port details from Pump model

The rest of the application shouldn't be required to know about the
details of a SerialPort when it deals with a Pump.  Also, the pump
should use our new SimpleSerialPort wrapper for SerialPort.

Switch to the narrower SimpleSerialPort interface, and stop passing
the path of the serial port from the FeederController.  This means
FeederController is now completely decoupled from serial ports, and
the Pump model is better focussed on its responsibility: controlling a
pump.
Make the serial port wrapper class configurable

I'd like to avoid talking to a serial port on my Mac in development
mode; it's not really hooked up to an Arduino.  So I need the serial
port to be configurable to be a stub.

Also, it's best if the Pump class knows just a bit less about the
default serial port.

Inject the configuration from the controller, because that already
knows about Rails, and it seems acceptable for it to know that a
hardware configuation exists (though not that it's necessarily
serial-specific).  Relieve the Pump model of knowing which class to
instanciate to create a serial port wrapper.
Implement DevSerialPort stub for development

Currently, "rails server" doesn't work unless the application is
connected to a real serial port.  But that's generally not the case
when developing on my Mac.

Provide a stub serial port and wire it up via the hardware config
in development mode only.