From 09b9dbe9516218bd5e7f1a69b2b3cfcd678471bf Mon Sep 17 00:00:00 2001 From: Neeraj Singh Date: Thu, 17 Jun 2010 11:54:02 -0400 Subject: [PATCH] failing test for #4841 --- activerecord/test/cases/relations_test.rb | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb index 43519db..06e69aa 100644 --- a/activerecord/test/cases/relations_test.rb +++ b/activerecord/test/cases/relations_test.rb @@ -469,6 +469,12 @@ class RelationTest < ActiveRecord::TestCase assert_equal 0, posts.count('comments_count') end + def test_multiple_selects + posts = Post.scoped.select('comments_count').select('title') + expected = Post.scoped.select('comments_count, title').to_sql.gsub(/\s{2,}/,' ') + assert_equal expected, posts.to_sql.gsub(/\s{2,}/,' ') + end + def test_size posts = Post.scoped -- 1.6.5.2