Fix tests with rails4