Fix rails 4.2 deprecation warnings in tests
Fix rails 4.2 deprecation warnings in tests