Module: Array::AtRandom::Etest

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

Instance Method Summary collapse

Instance Method Details

#test_at_randomObject



10
11
12
13
14
15
16
# File 'lib/vex/base/array/at_random.rb', line 10

def test_at_random
  array = [ 1, 2, 3, 4, 5 ]
  5.times do
    assert array.include?(array.at_random)
  end
  assert_equal nil, [].at_random
end