Suppress Ruby warnings when running specs

前端 未结 10 2260
野趣味
野趣味 2020-11-27 14:46

I\'m looking for a way to suppress Ruby warnings when I run my specs.

spec spec/models/account_spec.rb

I receive warnings such as:

10条回答
  •  半阙折子戏
    2020-11-27 15:40

    The only solution that worked for me is to add $VERBOSE = nil on top of my config/environments/test.rb file

      Rails.application.configure do
       $VERBOSE = nil
    

    I'm with faker warning problems faker-1.9.6/lib/faker/default/number.rb:34. Use it local because it hides all other warnings.

提交回复
热议问题