mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Make sure log level in development is debug
Laso make sure the tests are actually checking the log level of the app, not the one we set in the test helper.
This commit is contained in:
parent
70018f87f0
commit
7307994011
3 changed files with 10 additions and 4 deletions
|
@ -43,7 +43,7 @@ module Rails
|
||||||
@session_store = nil
|
@session_store = nil
|
||||||
@time_zone = "UTC"
|
@time_zone = "UTC"
|
||||||
@beginning_of_week = :monday
|
@beginning_of_week = :monday
|
||||||
@log_level = :info
|
@log_level = :debug
|
||||||
@generators = app_generators
|
@generators = app_generators
|
||||||
@cache_store = [ :file_store, "#{root}/tmp/cache/" ]
|
@cache_store = [ :file_store, "#{root}/tmp/cache/" ]
|
||||||
@railties_order = [:all]
|
@railties_order = [:all]
|
||||||
|
|
|
@ -1577,8 +1577,15 @@ module ApplicationTests
|
||||||
assert_equal session_options, app.config.session_options
|
assert_equal session_options, app.config.session_options
|
||||||
end
|
end
|
||||||
|
|
||||||
test "config.log_level defaults to info" do
|
test "config.log_level defaults to debug in development" do
|
||||||
make_basic_app
|
app "development"
|
||||||
|
|
||||||
|
assert_equal Logger::DEBUG, Rails.logger.level
|
||||||
|
end
|
||||||
|
|
||||||
|
test "config.log_level default to info in production" do
|
||||||
|
app "production"
|
||||||
|
|
||||||
assert_equal Logger::INFO, Rails.logger.level
|
assert_equal Logger::INFO, Rails.logger.level
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -206,7 +206,6 @@ module TestHelpers
|
||||||
config.session_store :cookie_store, key: "_myapp_session"
|
config.session_store :cookie_store, key: "_myapp_session"
|
||||||
config.active_support.deprecation = :log
|
config.active_support.deprecation = :log
|
||||||
config.action_controller.allow_forgery_protection = false
|
config.action_controller.allow_forgery_protection = false
|
||||||
config.log_level = :info
|
|
||||||
RUBY
|
RUBY
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue