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

Deprecation warning now targets at 5.1

Also, added a test case to make sure that the default deprecation horizon is
always bigger than the current Rails version.
This commit is contained in:
Akira Matsuda 2015-12-19 16:35:38 +09:00
parent bbd780f751
commit 6873db4699
2 changed files with 6 additions and 2 deletions

View file

@ -32,7 +32,7 @@ module ActiveSupport
# and the second is a library name
#
# ActiveSupport::Deprecation.new('2.0', 'MyLibrary')
def initialize(deprecation_horizon = '5.0', gem_name = 'Rails')
def initialize(deprecation_horizon = '5.1', gem_name = 'Rails')
self.gem_name = gem_name
self.deprecation_horizon = deprecation_horizon
# By default, warnings are not silenced and debugging is off.

View file

@ -340,6 +340,10 @@ class DeprecationTest < ActiveSupport::TestCase
assert_match(/You are calling deprecated method/, object.last_message)
end
def test_default_deprecation_horizon_should_always_bigger_than_current_rails_version
assert ActiveSupport::Deprecation.new.deprecation_horizon > ActiveSupport::VERSION::STRING
end
def test_default_gem_name
deprecator = ActiveSupport::Deprecation.new