Rails backtrace silencers do not work, while filters do

前端 未结 4 763
你的背包
你的背包 2021-01-12 00:42

Fresh Rails 4.2 set up. I want to suppress long error backtraces. In the following backtrace log first line would be enough for me, and next 4 could be removed



        
4条回答
  •  无人共我
    2021-01-12 01:12

    Problem was with Minitest-Reporters gem (adds colors to Minitest output), it messes up with Rails backtrace filters

    To fix you need to add the following to test_helper.rb

    Minitest::Reporters.use!(
      Minitest::Reporters::DefaultReporter.new,
      ENV,
      Minitest.backtrace_filter
    )
    

    Problem and solution details described here: https://github.com/kern/minitest-reporters#caveats

提交回复
热议问题