lib/minitest/utils_plugin.rb in minitest-utils-0.4.7 vs lib/minitest/utils_plugin.rb in minitest-utils-0.4.8
- old
+ new
@@ -7,10 +7,14 @@
def self.plugin_utils_init(options)
reporters = Minitest.reporter.reporters
reporters.clear
reporters << Minitest::Utils::Reporter.new(options[:io], options)
- return unless defined?(TestNotifier)
-
- reporters << TestNotifierReporter.new(options[:io], options)
+ begin
+ require "test_notifier"
+ reporters << Minitest::Utils::TestNotifierReporter.new(options[:io],
+ options)
+ rescue LoadError
+ # noop
+ end
end
end