Permalink
Browse files

Fix error for 'Deprecated' description

  • Loading branch information...
1 parent e0b23aa commit 3685aa2f1e84b44a8d631dcc33974f9b8eee28dd Roger Leite committed Apr 26, 2012
Showing with 10 additions and 1 deletion.
  1. +1 −1 lib/yard-tomdoc.rb
  2. +9 −0 test/unit/test_docstring.rb
View
@@ -59,7 +59,7 @@ def parse_comments(comments)
create_tag(:yield, tomdoc.yields) if tomdoc.yields
- create_tag(:deprecated) if tomdoc.deprecated?
+ create_tag(:deprecated, tomdoc.description.to_s) if tomdoc.deprecated?
create_tag(:private, tomdoc.description.to_s) if tomdoc.internal?
@@ -54,4 +54,13 @@
end
end
+
+ describe "Deprecated description" do
+
+ it "should fill deprecated tag" do
+ docstring = YARD::Docstring.new("# Deprecated: Don't use this.")
+ docstring.tag(:deprecated).text.assert == "Don't use this."
+ end
+
+ end
end

0 comments on commit 3685aa2

Please sign in to comment.