From a4d6e232fa4d6da0b41d4a9197c125c26dcbb528 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Thu, 8 Sep 2022 13:37:40 +0200 Subject: [PATCH] Enable deprecation warnings in test and development Now that we've got rid of all the warnings we had, we can enable them so we'll notice new warnings when we introduce them. This was the default option until Ruby 2.7.2 was released [1]. These warnings were turned off by default because pretty much every Ruby gem had dozens of warnings with Ruby 2.7 due to the changes in the way Ruby handles keyword arguments. [1] https://www.ruby-lang.org/en/news/2020/10/02/ruby-2-7-2-released/ --- config/environments/development.rb | 2 ++ config/environments/test.rb | 2 ++ 2 files changed, 4 insertions(+) diff --git a/config/environments/development.rb b/config/environments/development.rb index 13479dc34..1ad4459f3 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -1,3 +1,5 @@ +Warning[:deprecated] = true + Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. diff --git a/config/environments/test.rb b/config/environments/test.rb index 467972d2e..09ee31b58 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -3,6 +3,8 @@ # your test database is "scratch space" for the test suite and is wiped # and recreated between test runs. Don't rely on the data there! +Warning[:deprecated] = true + Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb.