From 04cc446d178653d362510e79a22db5300d463161 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C5=82awosz=20S=C5=82awi=C5=84ski?= Date: Sat, 23 Jul 2011 21:35:16 +0200 Subject: allow select to have multiple arguments --- activerecord/test/cases/base_test.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'activerecord/test') diff --git a/activerecord/test/cases/base_test.rb b/activerecord/test/cases/base_test.rb index f2f5b73626..84b66fdf49 100644 --- a/activerecord/test/cases/base_test.rb +++ b/activerecord/test/cases/base_test.rb @@ -123,6 +123,11 @@ class BasicsTest < ActiveRecord::TestCase assert_equal Topic.all.map(&:id).sort, topic_ids end + def test_select_symbol_for_many_arguments + topics = Topic.select(:id, :author_name).map{|topic| [topic.id, topic.author_name]}.sort + assert_equal Topic.all.map{|topic| [topic.id,topic.author_name]}.sort, topics + end + def test_table_exists assert !NonExistentTable.table_exists? assert Topic.table_exists? -- cgit v1.2.3