Make tests compatible with rails 3.2
Make tests compatible with rails 3.2