Skip to content
This repository was archived by the owner on Mar 15, 2022. It is now read-only.

Commit c8b8547

Browse files
committed
tests: make minitest-reporters optional
If we do not have minitest-reporters installed, we should be able to continue with the rest of the test suite. This allows the tests to run outside of Bundler if minitest-reporters is not installed.
1 parent f07018b commit c8b8547

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/test_helper.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,12 @@
2727

2828
require 'minitest/autorun'
2929

30-
require 'minitest/reporters'
31-
Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new(color: true)
30+
begin
31+
require 'minitest/reporters'
32+
Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new(color: true)
33+
rescue LoadError
34+
warn "warning: minitest-reporters gem not found; skipping reporters output"
35+
end
3236

3337
require 'thread'
3438
require 'thread_safe'

0 commit comments

Comments
 (0)