Module: TestMap::Plugins::Minitest
- Defined in:
- lib/test_map/plugins/minitest.rb
Overview
Minitest plugin for TestMap.
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(_base) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/test_map/plugins/minitest.rb', line 7 def self.included(_base) TestMap.logger.info 'Registering hooks for Minitest' ::Minitest.after_run do result = TestMap.reporter.to_yaml File.write "#{Dir.pwd}/#{Config.config[:out_file]}", result end end |
Instance Method Details
#after_setup ⇒ Object
15 16 17 18 19 |
# File 'lib/test_map/plugins/minitest.rb', line 15 def after_setup @recorder = FileRecorder.new.tap(&:trace) super end |
#before_teardown ⇒ Object
21 22 23 24 25 26 |
# File 'lib/test_map/plugins/minitest.rb', line 21 def before_teardown super @recorder.stop TestMap.reporter.add @recorder.results end |