diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_array.rb | 1 | ||||
-rw-r--r-- | test/ruby/test_enum.rb | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb index 035b70ad2a..877df749f8 100644 --- a/test/ruby/test_array.rb +++ b/test/ruby/test_array.rb @@ -539,6 +539,7 @@ class TestArray < Test::Unit::TestCase def test_count a = @cls[1, 2, 3, 1, 2] + assert_equal(5, a.count) assert_equal(2, a.count(1)) assert_equal(3, a.count {|x| x % 2 == 1 }) assert_equal(2, a.count(1) {|x| x % 2 == 1 }) diff --git a/test/ruby/test_enum.rb b/test/ruby/test_enum.rb index 97b4ec468b..a739982963 100644 --- a/test/ruby/test_enum.rb +++ b/test/ruby/test_enum.rb @@ -30,6 +30,7 @@ class TestEnumerable < Test::Unit::TestCase end def test_count + assert_equal(5, @obj.count) assert_equal(2, @obj.count(1)) assert_equal(3, @obj.count {|x| x % 2 == 1 }) assert_equal(2, @obj.count(1) {|x| x % 2 == 1 }) |