Rspec:如何在运行测试时禁止警告和通知?

Kle*_* S. 10 postgresql rspec2 ruby-on-rails-3 rails-postgresql

我之前使用的是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!"
Run Code Online (Sandbox Code Playgroud)

我怎么能压制那个?有办法吗,对吗?

Noa*_*ark 18

你有没有设置:config.use_transactional_examples = true假,看看是否有什么破坏?