aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorkennyj <kennyj@gmail.com>2013-06-01 21:36:50 +0900
committerkennyj <kennyj@gmail.com>2013-06-01 23:22:12 +0900
commit5d75579eec90e4fe0f3d33adbf5e7065a7cdcfa3 (patch)
tree5ad9bd8aaf6ce8f0a3f626bd18b6e1c1f82b9944 /activerecord/test/cases
parentd8c6f52d3b5971ed7541d1f6d92cac9e8f61f18c (diff)
downloadrails-5d75579eec90e4fe0f3d33adbf5e7065a7cdcfa3.tar.gz
rails-5d75579eec90e4fe0f3d33adbf5e7065a7cdcfa3.tar.bz2
rails-5d75579eec90e4fe0f3d33adbf5e7065a7cdcfa3.zip
Remove #sum with a block was deprecated.
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/associations/has_many_associations_test.rb6
-rw-r--r--activerecord/test/cases/calculations_test.rb6
2 files changed, 0 insertions, 12 deletions
diff --git a/activerecord/test/cases/associations/has_many_associations_test.rb b/activerecord/test/cases/associations/has_many_associations_test.rb
index 058c812dca..9f64ecd845 100644
--- a/activerecord/test/cases/associations/has_many_associations_test.rb
+++ b/activerecord/test/cases/associations/has_many_associations_test.rb
@@ -1747,12 +1747,6 @@ class HasManyAssociationsTest < ActiveRecord::TestCase
assert_deprecated { klass.has_many :foo, :counter_sql => 'lol' }
end
- test "sum calculation with block for array compatibility is deprecated" do
- assert_deprecated do
- posts(:welcome).comments.sum { |c| c.id }
- end
- end
-
test "has many associations on new records use null relations" do
post = Post.new
diff --git a/activerecord/test/cases/calculations_test.rb b/activerecord/test/cases/calculations_test.rb
index f49bef2346..095b78c6c8 100644
--- a/activerecord/test/cases/calculations_test.rb
+++ b/activerecord/test/cases/calculations_test.rb
@@ -410,12 +410,6 @@ class CalculationsTest < ActiveRecord::TestCase
Account.where("credit_limit > 50").from('accounts').sum(:credit_limit)
end
- def test_sum_array_compatibility_deprecation
- assert_deprecated do
- assert_equal Account.sum(:credit_limit), Account.sum(&:credit_limit)
- end
- end
-
def test_average_with_from_option
assert_equal Account.average(:credit_limit), Account.from('accounts').average(:credit_limit)
assert_equal Account.where("credit_limit > 50").average(:credit_limit),