From 76e94016a43c8c86eef869115ead22e93dbd1241 Mon Sep 17 00:00:00 2001 From: Arun Agrawal Date: Mon, 5 Sep 2011 12:49:34 +0530 Subject: Sort here to make sure the order is ok. --- activerecord/test/cases/batches_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activerecord/test/cases/batches_test.rb b/activerecord/test/cases/batches_test.rb index 6ce1fbc7fa..660098b9ad 100644 --- a/activerecord/test/cases/batches_test.rb +++ b/activerecord/test/cases/batches_test.rb @@ -128,7 +128,7 @@ class EachTest < ActiveRecord::TestCase end def test_find_in_batches_should_not_ignore_the_default_scope_if_it_is_other_then_order - special_posts_ids = SpecialPostWithDefaultScope.all.map(&:id) + special_posts_ids = SpecialPostWithDefaultScope.all.map(&:id).sort posts = [] SpecialPostWithDefaultScope.find_in_batches do |batch| posts.concat(batch) -- cgit v1.2.3