Generating List Of Features and Examples

20 views
Skip to first unread message

Dylan Reichstadt

unread,
Oct 19, 2015, 6:46:42 PM10/19/15
to rspec
Does anyone know of built-in method or external gem that can take all of your suite's Features/Examples and generate them into a nicely formatted list?

Someone asked me for a list of all of the rspec examples we have written.

I guess I could run the test with the Documentation formatter and copy/paste, but I'm looking for a better way at generating docs.

Myron Marston

unread,
Oct 19, 2015, 6:49:06 PM10/19/15
to rs...@googlegroups.com

The doc formatter is specifically intended to produce output that reads like documentation when you’ve written your example group and example descriptions with documentation in mind. The --dry-run flag allows you to get the formatter output from your suite without actually running it — so rspec --format doc --dry-run should provide you with a nice list of specs.

If the output of the documentation formatter isn’t to your liking, you can implement your own formatter and use that instead.


--
You received this message because you are subscribed to the Google Groups "rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rspec+un...@googlegroups.com.
To post to this group, send email to rs...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/e8037fb4-d7b9-4915-9fd2-2896ca176ee4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages