Fixed test for Rails versions prior to 4