在 RSpec 输出中显示断言数量?
默认情况下,RSpec 的输出以类似
14 examples, 0 failures
Is it possible to show the number of assertions made with this stat 的方式结束,类似于其他库提供的内容?
By default, RSpec's output ends with something like
14 examples, 0 failures
Is it possible to show the number of assertions made along with this stat, similar to what other libraries provide?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
对此没有任何支持。如果您对此感兴趣,请随时在 https://github 提交功能请求。 com/rspec/rspec-core/issues。
There's no support for that. If you're interested in it, please feel free to submit a feature request at https://github.com/rspec/rspec-core/issues.
每个示例规范只有一个断言是一个好习惯。
It's a good habit to have only one assertion per example spec.