Open emiltin opened 3 years ago
I've looked at existing plugins, but only found things 10+ year old, and haven't been able to get any of them to generate anything.
Can anyone help me with a small working example, or tell me why my attempt above doesn't work?
Looking more at https://github.com/lsegal/yard-spec-plugin I got it to generate something. But it seems to to assume that specs are linked to a specific instance method, and are nested inside an rspec descibe() block.
My use case is very simple, as described above: rspec it() blocks documented with a comment. The specs are not linked to a class or method.
I've worked more with the yard-rspec plugin and think I understand a bit more.
One thing I don't understand is how I can add a new main section in the resulting html. I would like RSpec tests to show up under a new main section called eg. "Specifications", not only as part of methods documentation, because my tests are not linked to instance methods.
Do I need to create a new subclass of CodeObject or can I just work with the template system?
Hi, I'm trying to write an extension that will document my rspec tests. Eg,
I'm looking at https://yardoc.org/guides/extending-yard/writing-handlers.html but feel stuck. I'm trying something like this:
Are there any examples or pointers that can help me, or do you have some tips? I found this very old repo https://github.com/burtlo/yard-rspec, but it seems it was not working even back then.