Sha256: edfa2c7f68e09fcbdafcfedf92844efb54408e1902c1d2e1e7ba1409c91d4b16

Contents?: true

Size: 626 Bytes

Versions: 1

Compression:

Stored size: 626 Bytes

Contents

#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |_
#   |_|\___||___/\__|
#
# for lib/facets/core/array/at_rand.rb
#
# Extracted Wed Aug 23 18:22:53 EDT 2006
# Unit Tools Reap Test Extractor
#

require 'facets/core/array/at_rand.rb'


  require 'test/unit'

  class TCArray < Test::Unit::TestCase

    def test_at_rand
      a = [1,2,3,4,5]
      20.times{ assert_nothing_raised{ a.at_rand } }
      20.times{ assert( a.include?( a.at_rand ) ) }
    end

    def test_at_rand!
      a = ['a','b','c']
      assert_equal( 1, a.at_rand!.length )
      assert_equal( 2, a.length )
    end

  end


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
facets-1.7.30 test/lib/facets/core/array/test_at_rand.rb