Upgrade from RSpec 2.99 to 3.1 to avoid transitional warnings

Rspec warns:

    rspec-rails 3 will no longer automatically infer an example group's spec
    type from the file location. You can explicitly opt-in to this feature
    using this snippet:

    RSpec.configure do |config|
      config.infer_spec_type_from_file_location!
    end

    If you wish to manually label spec types via metadata you can safely
    ignore this warning and continue upgrading to RSpec 3 without addressing
    it.

However, we can't stop depending on this inference behavior; rspec will
continue to warn.  This issue confirms that 2.99 is not intended to be
a version for long-term usage:
https://github.com/rspec/rspec-rails/issues/1053

Upgrade to 3.1:

* Adjust gemspec to require new RSpec version
* Avoid deprecated .should syntax
* Avoid deprecated .stub and .should_receive syntax
* Remove RSpec config to infer_spec_type_from_file_location!
* Explicitly set type for capybara spec
Log to Rails log rather than stdout

The strategy is currently logging to stdout, which clutters the
spec output.

Log to the Rails log instead.
Remove unneeded "require" calls from specs

Most of the specs explicitly require the code they test.  However, this
is no longer necessary because the whole module is loaded via
spec_helper.  Also, the requires break if I try to move the files around
(as I will do next).

Remove the superfluous requires.
Move unit-level specs to spec/units

The current specs are unit-level; they use stubbing extensively to
isolate the code under test.

Move them to a units subdirectory under spec/ to highlight this
commonality and make it easier to see what's in the spec/ directory.
Ensure spec/rails_app/db/ is present by creating schema.rb

Aaron reports that specs do not run without spec/rails_app/db.  The
directory was created by "rails plugin new" but Git didn't track it
because it was empty.

Add a file to db/ so it is created automatically during checkout.  We
could add a .gitkeep, but schema.rb belongs there anyway, so create an
initial one with no tables for now.
Make view helper test more resilient to environmental differences

The spec for the link_to_capturable view helper appears to be dependent
on some part of the Ruby development environment. On my setup and
Marcel's, the spec passes when we compare output against

    <a href="#" class="capture_modal_open" id="capture_signin_link">Login</a>

However, in Rune's environment, the passing output is

    <a class="capture_modal_open" href="#" id="capture_signin_link">Login</a>

To address this discrepancy, break down the test to look for matches
within the string, regardless of the order in which they get rendered.
Ignore test logs and database file

The embedded test Rails application outputs to a log file and stores
test data in a .sqlite3 file. While these files would typically be
ignored in a standard Rails application's Git repository, they are not
ignored in this testing structure. They may be accidentally committed
into source control as a result.

Ignore log/*.log and db/*.sqlite3 files in Git.