Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use explicit order to stop test failing randomly

  • Loading branch information...
commit 6f4b2469fb19bb01fa0f53192eb49f8f2d95db1b 1 parent cf9c368
@fcheung fcheung authored lifo committed
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
Please sign in to comment.
Something went wrong with that request. Please try again.