Fixing tests for all rails version