From 6873db4699ac727dd27eedb0994ecdd976b40901 Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Sat, 19 Dec 2015 16:35:38 +0900 Subject: 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. --- activesupport/test/deprecation_test.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'activesupport/test') 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 -- cgit v1.2.3