diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-07 10:48:14 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-07 10:48:14 -0700 |
commit | 604281221ce0eb71d7b922be2cd012018cca1fbf (patch) | |
tree | 3c1d79a707fc94bd0f5605c6eb07b9bf54ca91ba /activerecord/test | |
parent | d00f1c18eb2d113095e2d21d6876010a748037b0 (diff) | |
download | rails-604281221ce0eb71d7b922be2cd012018cca1fbf.tar.gz rails-604281221ce0eb71d7b922be2cd012018cca1fbf.tar.bz2 rails-604281221ce0eb71d7b922be2cd012018cca1fbf.zip |
select should raise error when no block or no parameter is passed
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/relations_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb index e21e1cb635..b7112d0e37 100644 --- a/activerecord/test/cases/relations_test.rb +++ b/activerecord/test/cases/relations_test.rb @@ -465,6 +465,10 @@ class RelationTest < ActiveRecord::TestCase assert davids.loaded? end + def test_select_argument_error + assert_raises(ArgumentError) { Developer.select } + end + def test_relation_merging devs = Developer.where("salary >= 80000") & Developer.limit(2) & Developer.order('id ASC').where("id < 3") assert_equal [developers(:david), developers(:jamis)], devs.to_a |