aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/batches_test.rb
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2012-04-26 15:51:23 +0100
committerJon Leighton <j@jonathanleighton.com>2012-04-26 18:04:41 +0100
commitf6ddb13113ac5cb4e75a7d041a1ff15a036fa0f3 (patch)
tree0444c1021f2c983c1efa80656979d7d39d2789f5 /activerecord/test/cases/batches_test.rb
parentbd91f70fd7817ddfc6eda5d8ab7d0c0e42be6a00 (diff)
downloadrails-f6ddb13113ac5cb4e75a7d041a1ff15a036fa0f3.tar.gz
rails-f6ddb13113ac5cb4e75a7d041a1ff15a036fa0f3.tar.bz2
rails-f6ddb13113ac5cb4e75a7d041a1ff15a036fa0f3.zip
remove deprecated #find_in_batches calls
Diffstat (limited to 'activerecord/test/cases/batches_test.rb')
-rw-r--r--activerecord/test/cases/batches_test.rb16
1 files changed, 2 insertions, 14 deletions
diff --git a/activerecord/test/cases/batches_test.rb b/activerecord/test/cases/batches_test.rb
index 660098b9ad..cdd4b49042 100644
--- a/activerecord/test/cases/batches_test.rb
+++ b/activerecord/test/cases/batches_test.rb
@@ -27,30 +27,18 @@ class EachTest < ActiveRecord::TestCase
def test_each_should_raise_if_select_is_set_without_id
assert_raise(RuntimeError) do
- Post.find_each(:select => :title, :batch_size => 1) { |post| post }
+ Post.select(:title).find_each(:batch_size => 1) { |post| post }
end
end
def test_each_should_execute_if_id_is_in_select
assert_queries(6) do
- Post.find_each(:select => "id, title, type", :batch_size => 2) do |post|
+ Post.select("id, title, type").find_each(:batch_size => 2) do |post|
assert_kind_of Post, post
end
end
end
- def test_each_should_raise_if_the_order_is_set
- assert_raise(RuntimeError) do
- Post.find_each(:order => "title") { |post| post }
- end
- end
-
- def test_each_should_raise_if_the_limit_is_set
- assert_raise(RuntimeError) do
- Post.find_each(:limit => 1) { |post| post }
- end
- end
-
def test_warn_if_limit_scope_is_set
ActiveRecord::Base.logger.expects(:warn)
Post.limit(1).find_each { |post| post }