Module: Array::Average::Etest

Defined in:
lib/vex/base/array/avg.rb

Instance Method Summary collapse

Instance Method Details

#test_avgObject


18
19
20
21
22
# 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)
end