diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2009-03-11 14:08:40 +0000 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-03-11 15:07:23 +0000 |
commit | 04333482bd665e4d4ced167ff4f566ecfc0cc919 (patch) | |
tree | 64c55675e3e4d25098ce648ddea0b0775f65a2e2 /activerecord/test/cases/batches_test.rb | |
parent | 19ad375e7afa99dc8bc5d859c478bae19c5ddc18 (diff) | |
download | rails-04333482bd665e4d4ced167ff4f566ecfc0cc919.tar.gz rails-04333482bd665e4d4ced167ff4f566ecfc0cc919.tar.bz2 rails-04333482bd665e4d4ced167ff4f566ecfc0cc919.zip |
Rename ActiveRecord::Base.each to ActiveRecord::Base.find_each
Diffstat (limited to 'activerecord/test/cases/batches_test.rb')
-rw-r--r-- | activerecord/test/cases/batches_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/test/cases/batches_test.rb b/activerecord/test/cases/batches_test.rb index 108d679108..705da9f88e 100644 --- a/activerecord/test/cases/batches_test.rb +++ b/activerecord/test/cases/batches_test.rb @@ -11,7 +11,7 @@ class EachTest < ActiveRecord::TestCase def test_each_should_excecute_one_query_per_batch assert_queries(Post.count + 1) do - Post.each(:batch_size => 1) do |post| + Post.find_each(:batch_size => 1) do |post| assert_kind_of Post, post end end @@ -19,13 +19,13 @@ class EachTest < ActiveRecord::TestCase def test_each_should_raise_if_the_order_is_set assert_raise(RuntimeError) do - Post.each(:order => "title") { |post| post } + Post.find_each(:order => "title") { |post| post } end end def test_each_should_raise_if_the_limit_is_set assert_raise(RuntimeError) do - Post.each(:limit => 1) { |post| post } + Post.find_each(:limit => 1) { |post| post } end end |