Module: Roby::Test::MinitestPlugin

Defined in:
lib/roby/test/minitest_plugin.rb

Overview

Plugin for minitest to set it up as we need

A ‘plugin’ must have its name registered in Minitest.extensions From there on, some methods - if they are made available as singleton methods on the Minitest module - will be called.

This module implement the methods we need to tune minitest as we need it. Just call MinitestPlugin.register before Minitest.run gets called

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.registerObject

Make this plugin active on Minitest

Must be called before Minitest.run



27
28
29
30
31
# File 'lib/roby/test/minitest_plugin.rb', line 27

def self.register
    Minitest.load_plugins
    Minitest.extensions << "roby"
    Minitest.extend MinitestPlugin
end

Instance Method Details

#plugin_roby_init(options) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/roby/test/minitest_plugin.rb', line 16

def plugin_roby_init(options)
    reporter = Minitest.reporter
    reporter.reporters.shift
    reporter.reporters.unshift(
        MinitestReporter.new(options[:io], options)
    )
end