From 8d4f7432516e82cc8a31889c83d36b112be39103 Mon Sep 17 00:00:00 2001 From: Bogdan Gusiev Date: Sun, 12 Dec 2010 15:46:17 +0200 Subject: [PATCH] Interpolated conditions and eager loading bug test [#6154] --- activerecord/test/cases/associations/eager_test.rb | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/activerecord/test/cases/associations/eager_test.rb b/activerecord/test/cases/associations/eager_test.rb index c96ca90..1224a6d 100644 --- a/activerecord/test/cases/associations/eager_test.rb +++ b/activerecord/test/cases/associations/eager_test.rb @@ -65,6 +65,10 @@ class EagerAssociationTest < ActiveRecord::TestCase end end + def test_with_interpolated_conditions + assert_equal Firm.all(:include => :clients_with_interpolated_conditions).class, Array + end + def test_with_two_tables_in_from_without_getting_double_quoted posts = Post.select("posts.*").from("authors, posts").eager_load(:comments).where("posts.author_id = authors.id").order("posts.id").to_a assert_equal 2, posts.first.comments.size -- 1.7.0.4