diff options
author | Godfrey Chan <godfreykfc@gmail.com> | 2014-11-25 02:17:13 -0800 |
---|---|---|
committer | Godfrey Chan <godfreykfc@gmail.com> | 2014-11-25 03:05:42 -0800 |
commit | 6ea7065a18671872f1486cff3fdaeb4f78fa6332 (patch) | |
tree | 767d809433e26818dc7623100e4880be7cb3e6ec /railties/test/application | |
parent | 6f08eeb6e8fe1082d5a427c0399c75ef8fcf380c (diff) | |
download | rails-6ea7065a18671872f1486cff3fdaeb4f78fa6332.tar.gz rails-6ea7065a18671872f1486cff3fdaeb4f78fa6332.tar.bz2 rails-6ea7065a18671872f1486cff3fdaeb4f78fa6332.zip |
Set the test_order in the basic app as well, see 58e8b48
This removes the unwanted deprecation warnings in the tests
Diffstat (limited to 'railties/test/application')
-rw-r--r-- | railties/test/application/configuration_test.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index 391139d7f8..f97be6e91d 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -967,6 +967,31 @@ module ApplicationTests end end + test "Not setting config.log_level is not deprecated for non-production environment" do + build_app + remove_from_config "config.log_level = .*" + with_rails_env "development" do + assert_not_deprecated(/log_level/) { require "#{app_path}/config/environment" } + end + end + + test "Not setting config.log_level is deprecated for the production environment" do + build_app + remove_from_config "config.log_level = .*" + with_rails_env "production" do + assert_deprecated(/log_level/) { require "#{app_path}/config/environment" } + end + end + + test "Setting config.log_level removes the deprecation warning" do + build_app + remove_from_config "config.log_level = .*" + add_to_env_config "production", "config.log_level = :info" + with_rails_env "production" do + assert_not_deprecated(/log_level/) { require "#{app_path}/config/environment" } + end + end + test "config.log_level with custom logger" do make_basic_app do |app| app.config.logger = Logger.new(STDOUT) |