3

In Ioke doc, the ISpec tests are included in the documentation, see ioke.org/dok/index.html

How can this be done with Ruby's RSpec and RDoc (or SDoc)? I can't find any commandline switches or external libs to do so. Any ideas (not including implementing it all by myself ;-) )?

bb.
  • 1,371
  • 1
  • 14
  • 21
  • YARD, an alternative to RDoc is easier extensible than RDoc: http://yard.soen.ca/ One YARD example goes a different approach, specifing RSpec as tagged comment and evaluating the comment as spec: http://github.com/lsegal/yard-examples/tree/217ada81ea8e23ee736ff9ebf94a90a9f8e93b0a/rspectest The disadvantage of that is: No autotest, no syntax highlight nor code completion for writing tests... but at least they're in the docs. – bb. Jul 25 '09 at 09:36
  • i don't think rdoc currently supports this feature. i also don't think the yard approach is the way to go. mapping specs to classes and modules is not that hard (see autotest) and it should be possible to implement this in a doc generator. – rubiii Mar 07 '10 at 12:02

1 Answers1

3

Time helps: Now there's a plugin for YARD doing exactly what I want: http://github.com/lsegal/yard-spec-plugin

bb.
  • 1,371
  • 1
  • 14
  • 21