aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem_commands_build_command.rb
diff options
context:
space:
mode:
authorJosef Šimánek <josef.simanek@gmail.com>2020-04-19 18:16:41 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-05-08 07:38:50 +0900
commit832a7b04589578b52297db6a9943e0c6c003fbfc (patch)
tree82705b5075092a4f783c4ad6ab263cf533724d88 /test/rubygems/test_gem_commands_build_command.rb
parent856cbbdd52eaafd27c21a8f4dea7e89373667694 (diff)
downloadruby-832a7b04589578b52297db6a9943e0c6c003fbfc.tar.gz
[rubygems/rubygems] Add gem build test to check for removed methods.
https://github.com/rubygems/rubygems/commit/c07b9cf4f1
Diffstat (limited to 'test/rubygems/test_gem_commands_build_command.rb')
-rw-r--r--test/rubygems/test_gem_commands_build_command.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_commands_build_command.rb b/test/rubygems/test_gem_commands_build_command.rb
index 9dfba75cf5..76ede1466f 100644
--- a/test/rubygems/test_gem_commands_build_command.rb
+++ b/test/rubygems/test_gem_commands_build_command.rb
@@ -127,6 +127,23 @@ class TestGemCommandsBuildCommand < Gem::TestCase
util_test_build_gem @gem
end
+ def test_execute_rubyforge_project_warning
+ rubyforge_gemspec = File.join SPECIFICATIONS, "rubyforge-0.0.1.gemspec"
+
+ @cmd.options[:args] = [rubyforge_gemspec]
+
+ use_ui @ui do
+ Dir.chdir @tempdir do
+ @cmd.execute
+ end
+ end
+
+ error = @ui.error.split("\n")
+ assert_equal "WARNING: rubyforge_project= is deprecated and ignored. Please remove this from your gemspec to ensure that your gem continues to build in the future.", error.shift
+ assert_equal "WARNING: See https://guides.rubygems.org/specification-reference/ for help", error.shift
+ assert_equal [], error
+ end
+
def test_execute_strict_with_warnings
bad_gem = util_spec 'some_bad_gem' do |s|
s.files = ['README.md']