Rspec:格式化时抑制测试输出?
我有一个非常大、非常复杂的测试套件。测试套件的某些方面与他们正在测试的应用程序的规范无关 - 它们只是为了确保我可以轻松地追踪测试本身不正确的问题 - 例如,夹具数据格式不正确。本质上,我有一组测试,其存在只是为了确保我的测试正常工作。
我想看看这个东西是否会因为明显的原因而失败,但我不希望它弄脏我的“规范”——有没有办法设置一个测试,或者更好的是,设置一个上下文,以在成功时不可见?
I've got a very large, very complex test suite. Some aspects of the test suite are unrelated to the spec of the application they are testing - they are simply there to insure that I can easily track down problems with the test itself being incorrect - for example, fixture data being improperly formatted. Essentially, I have a group of tests that exists solely to insure my tests are working correctly.
I WOULD like to see if this stuff fails, for obvious reasons, but I don't want it dirtying up my "specifications" - is there any way to set a test or, even better, a context, to invisible on success?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为 FUBAR,宝石,是最简单的选择。它会让事情爆炸性地失败,但除此之外只是一个简单的小状态栏。
I think FUBAR, the gem, is the simplest option. It will make things fail explosively, but otherwise be a simple little status bar.