aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations
diff options
context:
space:
mode:
authorTarmo Tänav <tarmo@itech.ee>2008-08-26 14:15:44 +0300
committerMichael Koziarski <michael@koziarski.com>2008-08-26 13:16:55 +0200
commiteec5eb2e444b2b42206e2d5ccfe7f30306c308cb (patch)
tree4b10b7bac08aac3b4eebb071afa2b752667d3d58 /activerecord/test/cases/associations
parent3dfecfe77347421fbb54be70a5a84eb47c30acb6 (diff)
downloadrails-eec5eb2e444b2b42206e2d5ccfe7f30306c308cb.tar.gz
rails-eec5eb2e444b2b42206e2d5ccfe7f30306c308cb.tar.bz2
rails-eec5eb2e444b2b42206e2d5ccfe7f30306c308cb.zip
Fix yet another implicit order dependant test
Signed-off-by: Michael Koziarski <michael@koziarski.com>
Diffstat (limited to 'activerecord/test/cases/associations')
-rw-r--r--activerecord/test/cases/associations/eager_test.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/test/cases/associations/eager_test.rb b/activerecord/test/cases/associations/eager_test.rb
index 956a2891aa..e78624a98d 100644
--- a/activerecord/test/cases/associations/eager_test.rb
+++ b/activerecord/test/cases/associations/eager_test.rb
@@ -260,9 +260,9 @@ class EagerAssociationTest < ActiveRecord::TestCase
end
def test_eager_with_has_many_through
- posts_with_comments = people(:michael).posts.find(:all, :include => :comments)
- posts_with_author = people(:michael).posts.find(:all, :include => :author )
- posts_with_comments_and_author = people(:michael).posts.find(:all, :include => [ :comments, :author ])
+ posts_with_comments = people(:michael).posts.find(:all, :include => :comments, :order => 'posts.id')
+ posts_with_author = people(:michael).posts.find(:all, :include => :author, :order => 'posts.id')
+ posts_with_comments_and_author = people(:michael).posts.find(:all, :include => [ :comments, :author ], :order => 'posts.id')
assert_equal 2, posts_with_comments.inject(0) { |sum, post| sum += post.comments.size }
assert_equal authors(:david), assert_no_queries { posts_with_author.first.author }
assert_equal authors(:david), assert_no_queries { posts_with_comments_and_author.first.author }