From ab416b4dde0a6216fdfec909abc553b8bec6bb73 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 4 Jul 2005 17:16:18 +0000 Subject: Make postgres8 ar tests work #1601 [Tobias Luetke] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1668 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/test/associations_go_eager_test.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'activerecord/test') diff --git a/activerecord/test/associations_go_eager_test.rb b/activerecord/test/associations_go_eager_test.rb index 460365bbdc..29a0e8a443 100644 --- a/activerecord/test/associations_go_eager_test.rb +++ b/activerecord/test/associations_go_eager_test.rb @@ -11,8 +11,9 @@ class EagerAssociationTest < Test::Unit::TestCase def test_loading_with_one_association posts = Post.find(:all, :include => :comments) - assert_equal 2, posts.first.comments.size - assert posts.first.comments.include?(comments(:greetings)) + post = posts.find { |p| p.id == 1 } + assert_equal 2, post.comments.size + assert post.comments.include?(comments(:greetings)) post = Post.find(:first, :include => :comments, :conditions => "posts.title = 'Welcome to the weblog'") assert_equal 2, post.comments.size -- cgit v1.2.3