aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem_stream_ui.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-18 08:37:18 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-18 08:37:18 +0000
commitec6c07570237b209d47b7690a5b5a6774301242b (patch)
tree70902f2e19499bb3bd26f014aa12bb43b96e9b22 /test/rubygems/test_gem_stream_ui.rb
parent3367daf716bda6e73f3418dd601bd1713d557c07 (diff)
downloadruby-ec6c07570237b209d47b7690a5b5a6774301242b.tar.gz
Merge upstream revision of rubygems/rubygems.
This commits includes tiny bugfix and new features listed here: * Add --re-sign flag to cert command by bronzdoc: https://github.com/rubygems/rubygems/pull/2391 * Download gems with threads. by indirect: https://github.com/rubygems/rubygems/pull/1898 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_stream_ui.rb')
-rw-r--r--test/rubygems/test_gem_stream_ui.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/rubygems/test_gem_stream_ui.rb b/test/rubygems/test_gem_stream_ui.rb
index 56ab1cee5b..5735bbc9a9 100644
--- a/test/rubygems/test_gem_stream_ui.rb
+++ b/test/rubygems/test_gem_stream_ui.rb
@@ -156,14 +156,14 @@ class TestGemStreamUI < Gem::TestCase
def test_download_reporter_anything
@cfg.verbose = 0
reporter = @sui.download_reporter
- assert_kind_of Gem::StreamUI::VerboseDownloadReporter, reporter
+ assert_kind_of Gem::StreamUI::ThreadedDownloadReporter, reporter
end
- def test_verbose_download_reporter
+ def test_threaded_download_reporter
@cfg.verbose = true
reporter = @sui.download_reporter
reporter.fetch 'a.gem', 1024
- assert_equal "Fetching: a.gem", @out.string
+ assert_equal "Fetching a.gem\n", @out.string
end
def test_verbose_download_reporter_progress
@@ -171,7 +171,7 @@ class TestGemStreamUI < Gem::TestCase
reporter = @sui.download_reporter
reporter.fetch 'a.gem', 1024
reporter.update 512
- assert_equal "Fetching: a.gem\rFetching: a.gem ( 50%)", @out.string
+ assert_equal "Fetching a.gem\n", @out.string
end
def test_verbose_download_reporter_progress_once
@@ -180,7 +180,7 @@ class TestGemStreamUI < Gem::TestCase
reporter.fetch 'a.gem', 1024
reporter.update 510
reporter.update 512
- assert_equal "Fetching: a.gem\rFetching: a.gem ( 50%)", @out.string
+ assert_equal "Fetching a.gem\n", @out.string
end
def test_verbose_download_reporter_progress_complete
@@ -189,7 +189,7 @@ class TestGemStreamUI < Gem::TestCase
reporter.fetch 'a.gem', 1024
reporter.update 510
reporter.done
- assert_equal "Fetching: a.gem\rFetching: a.gem ( 50%)\rFetching: a.gem (100%)\n", @out.string
+ assert_equal "Fetching a.gem\n", @out.string
end
def test_verbose_download_reporter_progress_nil_length
@@ -198,7 +198,7 @@ class TestGemStreamUI < Gem::TestCase
reporter.fetch 'a.gem', nil
reporter.update 1024
reporter.done
- assert_equal "Fetching: a.gem\rFetching: a.gem (1024B)\rFetching: a.gem (1024B)\n", @out.string
+ assert_equal "Fetching a.gem\n", @out.string
end
def test_verbose_download_reporter_progress_zero_length
@@ -207,7 +207,7 @@ class TestGemStreamUI < Gem::TestCase
reporter.fetch 'a.gem', 0
reporter.update 1024
reporter.done
- assert_equal "Fetching: a.gem\rFetching: a.gem (1024B)\rFetching: a.gem (1024B)\n", @out.string
+ assert_equal "Fetching a.gem\n", @out.string
end
def test_verbose_download_reporter_no_tty