diff options
author | Antonio Paulino <tonnyarauujo@gmail.com> | 2022-08-29 16:00:07 -0300 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2022-09-07 06:18:58 +0900 |
commit | 4c1f6750f2c333be2adf7ceab644598b230606d2 (patch) | |
tree | 47c80d6c2659e5aeda37f962429be7d23cc9899e /test/rubygems/test_gem_commands_info_command.rb | |
parent | 87ef90909b7656aaf8bb968376b879f9aa207a0b (diff) | |
download | ruby-4c1f6750f2c333be2adf7ceab644598b230606d2.tar.gz |
[rubygems/rubygems] Fix: Gem info bug with version flag
https://github.com/rubygems/rubygems/commit/e4cee1f975
Diffstat (limited to 'test/rubygems/test_gem_commands_info_command.rb')
-rw-r--r-- | test/rubygems/test_gem_commands_info_command.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_commands_info_command.rb b/test/rubygems/test_gem_commands_info_command.rb index b18b405da6..1c9ab7b07c 100644 --- a/test/rubygems/test_gem_commands_info_command.rb +++ b/test/rubygems/test_gem_commands_info_command.rb @@ -40,4 +40,30 @@ class TestGemCommandsInfoCommand < Gem::TestCase assert_match %r{#{@gem.summary}\n}, @ui.output assert_match "", @ui.error end + + def test_execute_with_version_flag + spec_fetcher do |fetcher| + fetcher.spec "coolgem", "1.0" + fetcher.spec "coolgem", "2.0" + end + + @cmd.handle_options %w[coolgem --remote --version 1.0] + + use_ui @ui do + @cmd.execute + end + + expected = <<-EOF + +*** REMOTE GEMS *** + +coolgem (1.0) + Author: A User + Homepage: http://example.com + + this is a summary + EOF + + assert_equal expected, @ui.output + end end |