Fix test for rails 4