Reputation: 14630
Is there way to suppress deprecation warnings on a line-by-line basis? I'm working on an old app that has a plugin causing deprecation warnings. I'd rather not change that plugin's code manually. But I could alter it to not show the warnings.
My tests look like garbage with all those warnings.
Upvotes: 1
Views: 259
Reputation: 14630
Hate to answer my own question, but this seems to do the trick:
ActiveSupport::Deprecation.silence do
# no warnings for any use of deprecated methods here
end
Upvotes: 1