Avoid ugly duplication of YAML in test setup
Drop support for Rails 3.1

Rails 3.1 is no longer maintained at all. If you're still using it, your
first priority is to upgrade.
Avoid loading unused Rails components in tests