Suppress Ruby warnings when running specs

前端 未结 10 2251
野趣味
野趣味 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:36

    You can also use the "RUBYOPT" environment variable to pass -W0 to rspec:

    RUBYOPT=W0 rspec spec/models/event_spec.rb
    

    This allows you to run multiple specs by passing in a directory

    RUBYOPT=W0 rspec spec/models
    

提交回复
热议问题