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:
Putting Warning[:deprecated] = false
after require "rails/all"
in config/application.rb
works very well to suppress those warnings everywhere. You can do
Warning[:deprecated] = false if Rails.env.test?
for your particular case, or better yet - put it in config/environments/test.rb
, but I'm not sure how well it is going to work since I belive some stuff is loaded before that.