Skip to content

Commit

Permalink
Add minitest reporters
Browse files Browse the repository at this point in the history
This helps troubleshoot flaky tests by printing the name and duration of each
test as it runs.
  • Loading branch information
sihugh committed Apr 2, 2019
1 parent c00498f commit 2a94bf7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ group :test do
gem 'capybara'
gem 'chromedriver-helper'
gem 'faker'
gem 'minitest-reporters'
gem 'mocha'
gem 'puma'
gem 'selenium-webdriver'
Expand Down
9 changes: 8 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ GEM
anemone (0.7.2)
nokogiri (>= 1.3.0)
robotex (>= 1.0.0)
ansi (1.5.0)
archive-zip (0.11.0)
io-like (~> 0.3.0)
arel (9.0.0)
Expand Down Expand Up @@ -180,6 +181,11 @@ GEM
mini_mime (1.0.1)
mini_portile2 (2.4.0)
minitest (5.11.3)
minitest-reporters (1.3.6)
ansi
builder
minitest (>= 5.0)
ruby-progressbar
mocha (1.8.0)
metaclass (~> 0.0.1)
money (6.13.2)
Expand Down Expand Up @@ -370,6 +376,7 @@ DEPENDENCIES
govuk_schemas (~> 3.2)
htmlentities (~> 4.3)
jasmine-rails
minitest-reporters
mocha
plek (~> 2.1)
pry-byebug
Expand All @@ -390,4 +397,4 @@ RUBY VERSION
ruby 2.6.1p33

BUNDLED WITH
1.17.1
1.17.3
3 changes: 3 additions & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@
require 'mocha/minitest'
require 'capybara/minitest'
require 'faker'
require "minitest/reporters"

Dir[Rails.root.join('test/support/*.rb')].each { |f| require f }

Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new

Capybara.register_driver :headless_chrome do |app|
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
chromeOptions: { args: %w(headless disable-gpu no-sandbox) }
Expand Down

0 comments on commit 2a94bf7

Please sign in to comment.