fix deprecation warnings for Rails 4.2 tests