Fixed tests for ActiveRecord 4.2