Sha256: 22c8857d3e252d717ef697be4423f80a4c24393a1c0d860c1a59c302b8c73895
Contents?: true
Size: 454 Bytes
Versions: 1
Compression:
Stored size: 454 Bytes
Contents
require 'facets/enumerable/count' require 'test/unit' class TC_Enumerable_Count < Test::Unit::TestCase def test_count_01 e = [ 'a', '1', 'a' ] assert_equal( 1, e.count('1') ) assert_equal( 2, e.count('a') ) end def test_count_02 e = [ ['a',2], ['a',2], ['a',2], ['b',1] ] assert_equal( 3, e.count(['a',2]) ) end def test_count_03 e = { 'a' => 2, 'a' => 2, 'b' => 1 } assert_equal(1, e.count(['a',2])) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
facets-2.7.0 | test/core/enumerable/test_count.rb |