summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_array.rb1
-rw-r--r--test/ruby/test_enum.rb1
2 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb
index 58ffe52675..4c7c3dfb6d 100644
--- a/test/ruby/test_array.rb
+++ b/test/ruby/test_array.rb
@@ -530,6 +530,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 6171c9a234..e541d566c0 100644
--- a/test/ruby/test_enum.rb
+++ b/test/ruby/test_enum.rb
@@ -29,6 +29,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 })