Rspec:运行测试时如何抑制警告和通知? [英] Rspec: How to suppress warnings and notices when running tests?
本文介绍了Rspec:运行测试时如何抑制警告和通知?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我以前使用过Mysql数据库,并决定切换到Postgresql,现在,当我使用rspec运行测试时,我收到很多警告和通知。
I was using Mysql database before and decided to switch to Postgresql and now, when I run my tests using rspec, I getting a lot of warnings and notices.
WARNING: there is already a transaction in progress
NOTICE: there is no transaction in progress
should has link "Suspender"
WARNING: there is already a transaction in progress
NOTICE: there is no transaction in progress
should has css "title" with text "Suspensão de anúncio"
WARNING: there is already a transaction in progress
NOTICE: there is no transaction in progress
should has css "h1" with text "Awesome job!"
我该如何抑制呢?有办法吗?
How can I suppress that? Is there a way, right?
推荐答案
您设置了吗: config.use_transactional_examples = true
为false,看看是否能破坏任何东西?
Did you set: config.use_transactional_examples = true
to false and see if that breaks anything?
这篇关于Rspec:运行测试时如何抑制警告和通知?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文