1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix deprecation message for SOURCE_ANNOTATION_DIRECTORIES

Also, added a test that a deprecated message will be output.
This commit is contained in:
yuuji.yaginuma 2018-07-20 13:19:10 +09:00
parent 9f152a6066
commit 1a0bcc3b49
2 changed files with 4 additions and 1 deletions

View file

@ -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

View file

@ -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