mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Set the test_order in the basic app as well, see 58e8b48
This removes the unwanted deprecation warnings in the tests
This commit is contained in:
parent
6f08eeb6e8
commit
6ea7065a18
2 changed files with 26 additions and 0 deletions
|
@ -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)
|
||||
|
|
|
@ -163,6 +163,7 @@ module TestHelpers
|
|||
app.secrets.secret_key_base = "3b7cd727ee24e8444053437c36cc66c4"
|
||||
app.config.session_store :cookie_store, key: "_myapp_session"
|
||||
app.config.active_support.deprecation = :log
|
||||
app.config.active_support.test_order = :random
|
||||
app.config.log_level = :info
|
||||
|
||||
yield app if block_given?
|
||||
|
|
Loading…
Reference in a new issue