Sha256: 3d00e26f1339b075a00081eabbe7efbb9a9c3c0dce40ea6593cfc44f756065ca

Contents?: true

Size: 607 Bytes

Versions: 1

Compression:

Stored size: 607 Bytes

Contents

#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |_
#   |_|\___||___/\__|
#
# for lib/facet/enumerable/commonality.rb
#
# Extracted Wed Jan 25 11:25:39 EST 2006
# Unit Tools Reap Test Extractor
#

require 'facet/enumerable/commonality.rb'


  require 'test/unit'

  class TCEnumerable < Test::Unit::TestCase

    def test_commonality
      a = [1,2,2,3,3,3]
      r = { 2 => [2,2], 3 => [3,3,3] }
      assert_equal( r, a.commonality )
      a = [1,2,2,3,3,3]
      r = {false=>[1, 2, 2], true=>[3, 3, 3]}
      assert_equal( r, a.commonality { |x| x > 2 } )
    end

  end


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
facets-1.0.3 packages/core/test/lib/facet/enumerable/test_commonality.rb