Skip to content

Commit ec298c7

Browse files
committed
Adds optional spec_reporter test output format
1 parent 3484d9a commit ec298c7

File tree

4 files changed

+14
-0
lines changed

4 files changed

+14
-0
lines changed

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ end
4141
group :test do
4242
gem 'capybara'
4343
gem 'climate_control'
44+
gem 'minitest-reporters'
4445
gem 'mocha'
4546
gem 'selenium-webdriver'
4647
gem 'simplecov'

Gemfile.lock

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ GEM
8989
annotate (3.2.0)
9090
activerecord (>= 3.2, < 8.0)
9191
rake (>= 10.4, < 14.0)
92+
ansi (1.5.0)
9293
ast (2.4.2)
9394
base64 (0.2.0)
9495
better_errors (2.10.1)
@@ -183,6 +184,11 @@ GEM
183184
matrix (0.4.2)
184185
mini_mime (1.1.5)
185186
minitest (5.22.2)
187+
minitest-reporters (1.6.1)
188+
ansi
189+
builder
190+
minitest (>= 5.0)
191+
ruby-progressbar
186192
mocha (2.1.0)
187193
ruby2_keywords (>= 0.0.5)
188194
msgpack (1.7.2)
@@ -372,6 +378,7 @@ DEPENDENCIES
372378
http
373379
importmap-rails
374380
jbuilder
381+
minitest-reporters
375382
mitlibraries-theme!
376383
mocha
377384
pg

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ may have unexpected consequences if applied to other TIMDEX UI apps.
6565

6666
### Test Environment-only Variables
6767

68+
- `SPEC_REPORTER`: Optional variable. If set, enables spec reporter style output from tests rather than minimal output.
6869
- `TIMDEX_HOST`: Test Env only. Used to ensure the VCR cassettes can properly scrub specific host data to make sure we get the same cassettes regardless of which host was used to generate the cassettes. This should be set to the host name that matches `TIMDEX_GRAPHQL`. Ex: If `TIMDEX_GRAPHQL` is `https://www.example.com/graphql` then `TIMDEX_HOST` should be `www.example.com`.
6970

7071
## Generating VCR Cassettes

test/test_helper.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
require 'rails/test_help'
1313
require 'mocha/minitest'
1414

15+
if ENV.fetch('SPEC_REPORTER', false)
16+
require 'minitest/reporters'
17+
Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new
18+
end
19+
1520
VCR.configure do |config|
1621
config.ignore_localhost = true
1722
config.cassette_library_dir = 'test/vcr_cassettes'

0 commit comments

Comments
 (0)