Fix deprecations for rails 4

Fix deprecation for Rails 4 test/minitest