aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem_commands_build_command.rb
diff options
context:
space:
mode:
authorGustavo Ribeiro <g2_ribeiro@hotmail.com>2022-12-22 15:24:58 -0300
committergit <svn-admin@ruby-lang.org>2022-12-26 19:08:55 +0000
commitf5a035daf9a399b62c05fbc90beb1bb42380d1f4 (patch)
tree03135cca9df7c449a5ca7f979c56635e84dc28b3 /test/rubygems/test_gem_commands_build_command.rb
parent08f6196bdac6b53df35caa5810839d28100d073c (diff)
downloadruby-f5a035daf9a399b62c05fbc90beb1bb42380d1f4.tar.gz
[rubygems/rubygems] deprecate gem build -C flag
https://github.com/rubygems/rubygems/commit/fac241d4ef
Diffstat (limited to 'test/rubygems/test_gem_commands_build_command.rb')
-rw-r--r--test/rubygems/test_gem_commands_build_command.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_commands_build_command.rb b/test/rubygems/test_gem_commands_build_command.rb
index 1edb30f221..f422d3e50a 100644
--- a/test/rubygems/test_gem_commands_build_command.rb
+++ b/test/rubygems/test_gem_commands_build_command.rb
@@ -41,6 +41,16 @@ class TestGemCommandsBuildCommand < Gem::TestCase
assert_includes Gem.platforms, Gem::Platform.local
end
+ def test_handle_deprecated_options
+ use_ui @ui do
+ @cmd.handle_options %w[-C ./test/dir]
+ end
+
+ assert_equal "WARNING: The \"-C\" option has been deprecated and will be removed in Rubygems 4.0. " \
+ "-C is a global flag now. Use `gem -C PATH build GEMSPEC_FILE [options]` instead\n",
+ @ui.error
+ end
+
def test_options_filename
gemspec_file = File.join(@tempdir, @gem.spec_name)