Fix Rails 4.2 test failures