diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2018-03-24 14:17:19 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2019-06-05 11:19:15 +0900 |
commit | 689b371a52c8c0ea15d82d5268647707cce27cef (patch) | |
tree | 2b81e8f1f1060c18f1bab6a519b8d09421ed0403 /railties/test/application | |
parent | 4cb0ce2e794f42c144629834d6f82cf5f21fcb75 (diff) | |
download | rails-689b371a52c8c0ea15d82d5268647707cce27cef.tar.gz rails-689b371a52c8c0ea15d82d5268647707cce27cef.tar.bz2 rails-689b371a52c8c0ea15d82d5268647707cce27cef.zip |
Extract default log file open operation to method
This allows customize a default log file(e.g. `reopen`) by an application.
Fixes #32211.
Diffstat (limited to 'railties/test/application')
-rw-r--r-- | railties/test/application/configuration_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index 7c613585e0..6f9711cb37 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -1607,6 +1607,13 @@ module ApplicationTests assert_not_nil Rails::SourceAnnotationExtractor::Annotation.extensions[/\.(coffee)$/] end + test "config.default_log_file returns a File instance" do + app "development" + + assert_instance_of File, app.config.default_log_file + assert_equal Rails.application.config.paths["log"].first, app.config.default_log_file.path + end + test "rake_tasks block works at instance level" do app_file "config/environments/development.rb", <<-RUBY Rails.application.configure do |