aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorAlberto Almagro <albertoalmagro@gmail.com>2019-01-04 00:25:05 +0100
committerAlberto Almagro <albertoalmagro@gmail.com>2019-01-04 00:32:33 +0100
commit3f2c86573155be1143107a8d81154b119fcb08ed (patch)
treeef494e3173cb8e791354a80527f6993014addda4 /activerecord
parentc6ef670aee186a2880b7be59c4c6892b5c983e58 (diff)
downloadrails-3f2c86573155be1143107a8d81154b119fcb08ed.tar.gz
rails-3f2c86573155be1143107a8d81154b119fcb08ed.tar.bz2
rails-3f2c86573155be1143107a8d81154b119fcb08ed.zip
Revert "Fix NumericData.average test on ruby 2.6"
This reverts commit 89b4612ffc97e6648f5cf807906ae210e05acdda.
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/test/cases/calculations_test.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/activerecord/test/cases/calculations_test.rb b/activerecord/test/cases/calculations_test.rb
index 5b5202d167..ade6b9e832 100644
--- a/activerecord/test/cases/calculations_test.rb
+++ b/activerecord/test/cases/calculations_test.rb
@@ -57,12 +57,8 @@ class CalculationsTest < ActiveRecord::TestCase
assert_equal 3, value
end
- def test_should_return_nil_to_d_as_average
- if nil.respond_to?(:to_d)
- assert_equal BigDecimal(0), NumericData.average(:bank_balance)
- else
- assert_nil NumericData.average(:bank_balance)
- end
+ def test_should_return_nil_as_average
+ assert_nil NumericData.average(:bank_balance)
end
def test_should_get_maximum_of_field