Fixing tests on rails 4