diff options
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/calculations_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/calculations_test.rb b/activerecord/test/calculations_test.rb index 67de1b9bd5..7b89e8c62c 100644 --- a/activerecord/test/calculations_test.rb +++ b/activerecord/test/calculations_test.rb @@ -147,6 +147,10 @@ class CalculationsTest < Test::Unit::TestCase assert_equal 3, c['CLIENT'] assert_equal 2, c['FIRM'] end + + def test_should_not_overshadow_enumerable_sum + assert_equal 6, [1, 2, 3].sum(&:abs) + end def test_should_sum_scoped_field assert_equal 15, companies(:rails_core).companies.sum(:id) |