aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations/eager_test.rb
diff options
context:
space:
mode:
authorFrederick Cheung <frederick.cheung@gmail.com>2008-12-21 12:37:29 +0000
committerPratik Naik <pratiknaik@gmail.com>2008-12-21 15:57:21 +0000
commit6f4b2469fb19bb01fa0f53192eb49f8f2d95db1b (patch)
tree69f74a896f5fee9aea8712448cfa038f680e4657 /activerecord/test/cases/associations/eager_test.rb
parentcf9c36834a8d11ef05da7bd7d2dce7c3e121501a (diff)
downloadrails-6f4b2469fb19bb01fa0f53192eb49f8f2d95db1b.tar.gz
rails-6f4b2469fb19bb01fa0f53192eb49f8f2d95db1b.tar.bz2
rails-6f4b2469fb19bb01fa0f53192eb49f8f2d95db1b.zip
Use explicit order to stop test failing randomly
Diffstat (limited to 'activerecord/test/cases/associations/eager_test.rb')
-rw-r--r--activerecord/test/cases/associations/eager_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/associations/eager_test.rb b/activerecord/test/cases/associations/eager_test.rb
index 42063d18a3..a2d0efab92 100644
--- a/activerecord/test/cases/associations/eager_test.rb
+++ b/activerecord/test/cases/associations/eager_test.rb
@@ -729,12 +729,12 @@ class EagerAssociationTest < ActiveRecord::TestCase
assert_equal authors(:david), assert_no_queries { posts[0].author}
posts = assert_queries(2) do
- Post.find(:all, :include => :author, :joins => {:taggings => :tag}, :conditions => "tags.name = 'General'")
+ Post.find(:all, :include => :author, :joins => {:taggings => :tag}, :conditions => "tags.name = 'General'", :order => 'posts.id')
end
assert_equal posts(:welcome, :thinking), posts
posts = assert_queries(2) do
- Post.find(:all, :include => :author, :joins => {:taggings => {:tag => :taggings}}, :conditions => "taggings_tags.super_tag_id=2")
+ Post.find(:all, :include => :author, :joins => {:taggings => {:tag => :taggings}}, :conditions => "taggings_tags.super_tag_id=2", :order => 'posts.id')
end
assert_equal posts(:welcome, :thinking), posts