Send admin expiration notices only on billing dates.

... Instead of sending one every day after the account has expired.

https://www.pivotaltracker.com/story/show/50200273
Test refactor: moved login to background step.

The tests broke because the organization under test was no longer the
first, and so just clicking 'Edit' edited the sysadmin's organization
instead. So now we have a helper to edit the latest organization.
Notifications: List of renewing orgs for admins.

To do:

  * find out whether we need manual, automatic, or all renewals
  * add links in the email
  * fix bug where we only list orgs whose next billing date has
    been explicitly set (most are computed on the fly)
  * don't list orgs that just signed up and haven't been charged yet

https://www.pivotaltracker.com/story/show/70452188
Fixed test bug that only happens just before midnight.

At 11:30 on May 2 CST, the spec was expecting the next billing date to
be May 2 of next year, but the app was in EST, so the next billing date
was set to May 3. The app was right.
Test refactor: Better default organization names.

Helps us tell which organization is which in test output.

Regenerated all the VCR cassettes because the billing info changed, and
also because it seems like a good idea to do it now and then.
Notifications: Add links to renewing org pages.
Notifications: expiring credit cards admin notice.

Also some small fixes to the organization factories (can't nest a
factory in a trait; use Time.zone.today, not Date.today).

https://www.pivotaltracker.com/story/show/70452188
Stop hitting external services in unit tests.
Notifications: renewal receipt.

To do:

  * create message body (editable by admins)
  * defer mail processing (https://www.pivotaltracker.com/story/show/70700134)
  * fill in some details based on answers from Nina

https://www.pivotaltracker.com/story/show/70452068
Email template editor.

https://www.pivotaltracker.com/story/show/70451272
Upgraded RSpec to get test spies.

Also upgraded RSpec-Rails and Shoulda, for compatibility.

Not sure why, but any_instance seemed to stop working.
allow_any_instance_of works.
Admins can preview email templates in the browser.

https://www.pivotaltracker.com/story/show/70451378
Log less in production.

We don't usually need all the debugging output.
Isolated this test a little more.

Also, the authenticate_admin! stub shouldn't return a value, because the
actual method doesn't return a value.
Email templates: Fill in data with Mustache.

Also, use the template's subject line.

https://www.pivotaltracker.com/story/show/70451272
Templates: Use Mustache and sample data for preview.

https://www.pivotaltracker.com/story/show/70451378
Renewal reminders.

https://www.pivotaltracker.com/story/show/70452068
Refactor: Dead code elimination.
Consistently call active organizations "active."

Instead of sometimes calling them "approved."
Notifications: Made subject lines templatable.

Subject lines now use Mustache, just like message bodies.

https://www.pivotaltracker.com/story/show/70451768