Browse files

Use explicit order to stop test failing randomly

  • Loading branch information...
1 parent cf9c368 commit 6f4b2469fb19bb01fa0f53192eb49f8f2d95db1b @fcheung fcheung committed with lifo Dec 21, 2008
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/test/cases/associations/eager_test.rb
View
4 activerecord/test/cases/associations/eager_test.rb
@@ -729,12 +729,12 @@ def test_eager_loading_with_conditions_on_joined_table_preloads
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

0 comments on commit 6f4b246

Please sign in to comment.