diff options
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_enum.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_enum.rb b/test/ruby/test_enum.rb index c56e280e06..1029143db6 100644 --- a/test/ruby/test_enum.rb +++ b/test/ruby/test_enum.rb @@ -294,6 +294,11 @@ class TestEnumerable < Test::Unit::TestCase assert_equal(h, @obj.each_with_index.group_by(&cond)) end + def test_tally + h = {1 => 2, 2 => 2, 3 => 1} + assert_equal(h, @obj.tally) + end + def test_first assert_equal(1, @obj.first) assert_equal([1, 2, 3], @obj.first(3)) |