有没有办法在不实际运行测试的情况下生成 RSpec 测试的文档?
对于给定目录中每个规范文件中的每个测试,我想生成 rspec spec --format Documentation 的输出,所以它看起来像这样:
something
does something that passes
does something that fails
does something that is pending
我不希望它实际运行测试。我想要一个列表,以便我可以衡量当前的测试覆盖率水平。这些不是单元测试,因此 RCov 没有用。
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 list so that I can gauge the current test coverage level. These are not unit tests, so RCov would be of no use.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这来得太晚了几年:D,但你可以这样做:
This comes a few years too late :D, but here's what you can do:
以前是这样的,直到我们添加了一个衬垫:
该表单被广泛使用,并且只有在运行时才能生成文档。
There used to be until we added one liners:
That form is widely used and can only generate documentation if it runs.