Sha256: a570718a81f5d72c124a5069d9d90ecc1689fc43a11005546edc256df183a1f3

Contents?: true

Size: 581 Bytes

Versions: 1

Compression:

Stored size: 581 Bytes

Contents

#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |_
#   |_|\___||___/\__|
#
# for lib/facets/core/enumerable/occur.rb
#
# Extracted Tue Jun 06 09:30:19 EDT 2006
# Unit Tools Reap Test Extractor
#

require 'facets/core/enumerable/occur.rb'


  require 'test/unit'

  class TCEnumerable < Test::Unit::TestCase

    def test_occur
      arr = [:a,:b,:a]
      assert_equal( [:b], arr.occur(1) )
      assert_equal( [:a], arr.occur(2) )
      assert_equal( [:b], arr.occur(1..1) )
      assert_equal( [:a], arr.occur{ |n| n % 2 == 0 } )
    end

  end


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
facets-1.4.1 test/lib/facets/core/enumerable/test_occur.rb