diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2018-07-20 13:19:10 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2018-07-20 13:19:10 +0900 |
commit | 1a0bcc3b49e05eba852912f609a20c36a9656857 (patch) | |
tree | 761adf3eeb683933cb86dae00f68c632d317001f /railties | |
parent | 9f152a6066711325a37724f0561a505e134963e9 (diff) | |
download | rails-1a0bcc3b49e05eba852912f609a20c36a9656857.tar.gz rails-1a0bcc3b49e05eba852912f609a20c36a9656857.tar.bz2 rails-1a0bcc3b49e05eba852912f609a20c36a9656857.zip |
Fix deprecation message for `SOURCE_ANNOTATION_DIRECTORIES`
Also, added a test that a deprecated message will be output.
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/commands/notes/notes_command.rb | 2 | ||||
-rw-r--r-- | railties/test/application/rake/notes_test.rb | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/railties/lib/rails/commands/notes/notes_command.rb b/railties/lib/rails/commands/notes/notes_command.rb index a0faaeff8f..64b339b3cd 100644 --- a/railties/lib/rails/commands/notes/notes_command.rb +++ b/railties/lib/rails/commands/notes/notes_command.rb @@ -28,7 +28,7 @@ module Rails def deprecation_warning return if source_annotation_directories.empty? - ActiveSupport::Deprecation.warn("`SOURCE_ANNOTATION_DIRECTORIES` will be deprecated in Rails 6.1. You can add default directories by using config.annotations.register_directories instead.") + ActiveSupport::Deprecation.warn("`SOURCE_ANNOTATION_DIRECTORIES` is deprecated and will be removed in Rails 6.1. You can add default directories by using config.annotations.register_directories instead.") end def source_annotation_directories diff --git a/railties/test/application/rake/notes_test.rb b/railties/test/application/rake/notes_test.rb index d73e5cdfa3..999155fa93 100644 --- a/railties/test/application/rake/notes_test.rb +++ b/railties/test/application/rake/notes_test.rb @@ -87,6 +87,9 @@ module ApplicationTests assert_equal 6, lines.size assert_equal [4], lines.map(&:size).uniq + + log = File.read(Rails.application.config.paths["log"].first) + assert_match(/`SOURCE_ANNOTATION_DIRECTORIES` is deprecated/, log) end end |