ruby-on-rails-3 – Rspec:运行测试时如何抵制警告和通知?

前端之家收集整理的这篇文章主要介绍了ruby-on-rails-3 – Rspec:运行测试时如何抵制警告和通知?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
之前我正在使用MysqL数据库,并决定切换到 Postgresql,现在,当我使用rspec运行我的测试时,我收到了很多警告和通知.
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!"

我该怎么抑制呢?有办法吗?

解决方法

你设置了:config.use_transactional_examples = true为false,看看是否打破了什么?

猜你在找的Ruby相关文章