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

前端之家收集整理的这篇文章主要介绍了ruby-on-rails-3 – Rspec:运行测试时如何抵制警告和通知?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
之前我正在使用MysqL数据库,并决定切换到 Postgresql,现在,当我使用rspec运行我的测试时,我收到了很多警告和通知.
  1. WARNING: there is already a transaction in progress
  2. NOTICE: there is no transaction in progress
  3. should has link "Suspender"
  4. WARNING: there is already a transaction in progress
  5. NOTICE: there is no transaction in progress
  6. should has css "title" with text "Suspensão de anúncio"
  7. WARNING: there is already a transaction in progress
  8. NOTICE: there is no transaction in progress
  9. should has css "h1" with text "Awesome job!"

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

解决方法

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

猜你在找的Ruby相关文章