diff options
author | Akira Matsuda <ronnie@dio.jp> | 2015-12-19 16:35:38 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2015-12-19 16:41:07 +0900 |
commit | 6873db4699ac727dd27eedb0994ecdd976b40901 (patch) | |
tree | cc0f6046becbf12935ea312039fa7a77ae6c3907 /activesupport/test | |
parent | bbd780f75147b8560596f0a64b98d82f44b621ad (diff) | |
download | rails-6873db4699ac727dd27eedb0994ecdd976b40901.tar.gz rails-6873db4699ac727dd27eedb0994ecdd976b40901.tar.bz2 rails-6873db4699ac727dd27eedb0994ecdd976b40901.zip |
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.
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/deprecation_test.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/activesupport/test/deprecation_test.rb b/activesupport/test/deprecation_test.rb index cd02ad3f3f..58a0a3964d 100644 --- a/activesupport/test/deprecation_test.rb +++ b/activesupport/test/deprecation_test.rb @@ -199,7 +199,7 @@ class DeprecationTest < ActiveSupport::TestCase end def test_assert_deprecated_warn_work_with_default_behavior - ActiveSupport::Deprecation.instance_variable_set('@behavior' , nil) + ActiveSupport::Deprecation.instance_variable_set('@behavior', nil) assert_deprecated('abc') do ActiveSupport::Deprecation.warn 'abc' end @@ -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 |