For each test in each spec file in a given directory, I would like to generate the output of rspec spec --format documentation
, so it looks something like this:
something
does something that passes
does something that fails
does something that is pending
I don't want it to actually run the tests. I would like a li开发者_高级运维st so that I can gauge the current test coverage level. These are not unit tests, so RCov would be of no use.
This comes a few years too late :D, but here's what you can do:
rspec --dry-run --format documentation
There used to be until we added one liners:
it { should do_something }
That form is widely used and can only generate documentation if it runs.
精彩评论