Module: Array::Average::Etest
- Defined in:
- lib/vex/base/array/avg.rb
Instance Method Summary collapse
Instance Method Details
#test_avg ⇒ Object
18 19 20 21 22 23 |
# File 'lib/vex/base/array/avg.rb', line 18 def test_avg assert_equal(1, [ 1 ].avg) assert_equal(2, [ 1, 3 ].avg) assert_equal(0, [ ].avg) assert_equal(2.0 / 3, [ 1, 3, -2 ].avg) end |