summaryrefslogtreecommitdiff
path: root/test/rdoc/test_rdoc_stats.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-07 01:22:37 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-07 01:22:37 +0000
commit4260aa1dc399e1bb4a2147409ed1139112cfefb8 (patch)
tree72b378fdcef83d532147bb6deeafe2ad55134f3e /test/rdoc/test_rdoc_stats.rb
parent7d2d6d0a2f600943ab484238b4722036151376a5 (diff)
* lib/rdoc: Update to RDoc 4.2.0.
* test/rdoc: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rdoc/test_rdoc_stats.rb')
-rw-r--r--test/rdoc/test_rdoc_stats.rb55
1 files changed, 55 insertions, 0 deletions
diff --git a/test/rdoc/test_rdoc_stats.rb b/test/rdoc/test_rdoc_stats.rb
index 7d336bedc8..cd37c29fce 100644
--- a/test/rdoc/test_rdoc_stats.rb
+++ b/test/rdoc/test_rdoc_stats.rb
@@ -663,5 +663,60 @@ m(a, b) { |c, d| ... }
RDoc::Markup::ToRdoc.new
end
+ def test_undoc_params
+ method = RDoc::AnyMethod.new [], 'm'
+ method.params = '(a)'
+ method.comment = comment 'comment'
+
+ total, undoc = @s.undoc_params method
+
+ assert_equal 1, total
+ assert_equal %w[a], undoc
+ end
+
+ def test_undoc_params_block
+ method = RDoc::AnyMethod.new [], 'm'
+ method.params = '(&a)'
+ method.comment = comment '+a+'
+
+ total, undoc = @s.undoc_params method
+
+ assert_equal 1, total
+ assert_empty undoc
+ end
+
+ def test_undoc_params_documented
+ method = RDoc::AnyMethod.new [], 'm'
+ method.params = '(a)'
+ method.comment = comment '+a+'
+
+ total, undoc = @s.undoc_params method
+
+ assert_equal 1, total
+ assert_empty undoc
+ end
+
+ def test_undoc_params_keywords
+ method = RDoc::AnyMethod.new [], 'm'
+ method.params = '(**a)'
+ method.comment = comment '+a+'
+
+ total, undoc = @s.undoc_params method
+
+ assert_equal 1, total
+ assert_empty undoc
+ end
+
+ def test_undoc_params_splat
+ method = RDoc::AnyMethod.new [], 'm'
+ method.params = '(*a)'
+ method.comment = comment '+a+'
+
+ total, undoc = @s.undoc_params method
+
+ assert_equal 1, total
+ assert_empty undoc
+ end
+
end