Resolved a number of issues relating to moving test.rb up to Rails 4.x.