diff options
author | Josef Šimánek <josef.simanek@gmail.com> | 2020-04-19 17:43:31 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-05-08 07:38:50 +0900 |
commit | 856cbbdd52eaafd27c21a8f4dea7e89373667694 (patch) | |
tree | c9bb3c9574c83d53e3e0fdbbfe6e454e5f57235a /test | |
parent | 4dd46dbad046c0c5902f0217243c3207dbb274b5 (diff) | |
download | ruby-856cbbdd52eaafd27c21a8f4dea7e89373667694.tar.gz |
[rubygems/rubygems] Track removed methods calls and warn during build time.
move rubyforge_project= to removed methods
https://github.com/rubygems/rubygems/commit/223f7fd470
Diffstat (limited to 'test')
-rw-r--r-- | test/rubygems/test_gem_specification.rb | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb index cf4a4de6c9..21cd7c87b3 100644 --- a/test/rubygems/test_gem_specification.rb +++ b/test/rubygems/test_gem_specification.rb @@ -3128,24 +3128,19 @@ http://spdx.org/licenses or 'Nonstandard' for a nonstandard license. warning end - def test_deprecated_attributes - assert_equal Gem::SpecificationPolicy::DEPRECATED_ATTRIBUTES, [:rubyforge_project] + def test_removed_methods + assert_equal Gem::Specification::REMOVED_METHODS, [:rubyforge_project=] end - def test_validate_deprecated_attributes + def test_validate_removed_rubyforge_project util_setup_validate use_ui @ui do - Gem::SpecificationPolicy::DEPRECATED_ATTRIBUTES.each do |attr| - @a1.send("#{attr}=", 'invalid-attribute') - end - + @a1.rubyforge_project = 'invalid-attribute' @a1.validate end - Gem::SpecificationPolicy::DEPRECATED_ATTRIBUTES.each do |attr| - assert_match "#{attr} is deprecated", @ui.error - end + assert_match "rubyforge_project= is deprecated", @ui.error end def test_validate_license_values |