tests: add progress bar to test output.

Add minitest-reporters gem. Replace the default output of `bin/rails
test` with a progress bar. The default output just emits periods for
passed tests, which makes it hard to tell how long tests will take and
causes test runner output on Github to appear to hang. The web console
on Github is line buffered, but the default test runner doesn't normally
emit newlines (unless a test fails), so the output can hang for a long
time.
This commit is contained in:
evazion
2020-06-10 17:52:33 -05:00
parent 5e63a7cf77
commit 15423e0b7b
3 changed files with 11 additions and 0 deletions

View File

@@ -88,6 +88,7 @@ group :test do
gem "simplecov", :require => false
gem "webmock"
gem "minitest-ci"
gem "minitest-reporters"
gem "mock_redis"
gem "capybara"
gem "selenium-webdriver"

View File

@@ -74,6 +74,7 @@ GEM
public_suffix (>= 2.0.2, < 5.0)
airbrussh (1.4.0)
sshkit (>= 1.6.1, != 1.7.0)
ansi (1.5.0)
ast (2.4.0)
aws-eventstream (1.1.0)
aws-partitions (1.326.0)
@@ -214,6 +215,11 @@ GEM
minitest (5.14.1)
minitest-ci (3.4.0)
minitest (>= 5.0.6)
minitest-reporters (1.4.2)
ansi
builder
minitest (>= 5.0)
ruby-progressbar
mocha (1.11.2)
mock_redis (0.23.0)
msgpack (1.3.3)
@@ -453,6 +459,7 @@ DEPENDENCIES
memory_profiler
meta_request
minitest-ci
minitest-reporters
mocha
mock_redis
net-sftp

View File

@@ -13,6 +13,9 @@ require 'rails/test_help'
require 'cache'
require 'webmock/minitest'
require 'mocha/minitest'
require 'minitest/reporters'
Minitest::Reporters.use!(Minitest::Reporters::ProgressReporter.new)
Dir[File.expand_path(File.dirname(__FILE__) + "/factories/*.rb")].sort.each {|file| require file}
Dir[File.expand_path(File.dirname(__FILE__) + "/test_helpers/*.rb")].sort.each {|file| require file}