Fixed tests for ActiveRecord 3.1