diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2011-03-29 12:51:58 +0100 |
---|---|---|
committer | Andrew White <andyw@pixeltrix.co.uk> | 2011-03-29 12:51:58 +0100 |
commit | b155fdadf334cff32a7e648c86c3c97f2f51257f (patch) | |
tree | b37f577956056626189c18374ccecbd57b140955 /activerecord/test | |
parent | 84a4ef63a4b890dc29cd62543f52c863fb0f0dd5 (diff) | |
download | rails-b155fdadf334cff32a7e648c86c3c97f2f51257f.tar.gz rails-b155fdadf334cff32a7e648c86c3c97f2f51257f.tar.bz2 rails-b155fdadf334cff32a7e648c86c3c97f2f51257f.zip |
Change exists? so that it doesn't instantiate records [#6127 state:resolved]
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/finder_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/cases/finder_test.rb b/activerecord/test/cases/finder_test.rb index 543981b4a0..316113634b 100644 --- a/activerecord/test/cases/finder_test.rb +++ b/activerecord/test/cases/finder_test.rb @@ -74,6 +74,11 @@ class FinderTest < ActiveRecord::TestCase end end + def test_exists_does_not_instantiate_records + Developer.expects(:instantiate).never + Developer.exists? + end + def test_find_by_array_of_one_id assert_kind_of(Array, Topic.find([ 1 ])) assert_equal(1, Topic.find([ 1 ]).length) |