summaryrefslogtreecommitdiffhomepage
path: root/spec
diff options
context:
space:
mode:
authorSeba Gamboa <[email protected]>2015-10-12 14:13:11 -0200
committerSeba Gamboa <[email protected]>2015-10-12 14:13:11 -0200
commit89853c9da5d1274612f28ef8cb3e1ab22501e856 (patch)
tree733ac18fbbd60fd492b65131bfa313015eba9089 /spec
parentd2538783741de8681bdd0fa7e7e268bc24eddb4a (diff)
parent4d1b7420a4aaaaa8da14091d95ed007f4efb93ab (diff)
downloadyard-mruby-89853c9da5d1274612f28ef8cb3e1ab22501e856.tar.gz
yard-mruby-89853c9da5d1274612f28ef8cb3e1ab22501e856.zip
Merge pull request #8 from takahashim/typedef_handler
support typedef documentation
Diffstat (limited to 'spec')
-rw-r--r--spec/handlers/c/header/typdef_handler_spec.rb23
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/handlers/c/header/typdef_handler_spec.rb b/spec/handlers/c/header/typdef_handler_spec.rb
new file mode 100644
index 0000000..59391e2
--- /dev/null
+++ b/spec/handlers/c/header/typdef_handler_spec.rb
@@ -0,0 +1,23 @@
+require_relative 'spec_helper'
+
+describe YARD::MRuby::Handlers::C::Header::TypedefHandler do
+ it "should register typedef" do
+ header_line <<-eof
+ typedef const char *mrb_args_format;
+ eof
+
+ expect(Registry.at('mrb_args_format')).not_to be_nil
+ end
+
+ it "should find docstrings attached to typedefs" do
+ header_line <<-eof
+ /**
+ * Format specifiers for \ref mrb_get_args function
+ */
+ typedef const char *mrb_args_format;
+ eof
+
+ define = Registry.at('mrb_args_format')
+ expect(define.docstring).to eq "Format specifiers for \ref mrb_get_args function"
+ end
+end