Class: Minitest::Distributed::Reporters::TestOrderReporter
- Inherits:
-
Reporter
- Object
- Reporter
- Minitest::Distributed::Reporters::TestOrderReporter
- Extended by:
- T::Sig
- Defined in:
- lib/minitest/distributed/reporters/test_order_reporter.rb
Instance Method Summary collapse
-
#initialize(io, options) ⇒ TestOrderReporter
constructor
A new instance of TestOrderReporter.
- #prerecord(klass, name) ⇒ Object
- #report ⇒ Object
- #start ⇒ Object
Constructor Details
#initialize(io, options) ⇒ TestOrderReporter
Returns a new instance of TestOrderReporter.
11 12 13 14 15 |
# File 'lib/minitest/distributed/reporters/test_order_reporter.rb', line 11 def initialize(io, ) super @path = T.let(.fetch(:test_order_file), String) @file = T.let(nil, T.nilable(File)) end |
Instance Method Details
#prerecord(klass, name) ⇒ Object
24 25 26 27 |
# File 'lib/minitest/distributed/reporters/test_order_reporter.rb', line 24 def prerecord(klass, name) T.must(@file).puts("#{klass}##{name}") T.must(@file).flush end |
#report ⇒ Object
30 31 32 |
# File 'lib/minitest/distributed/reporters/test_order_reporter.rb', line 30 def report T.must(@file).close end |
#start ⇒ Object
18 19 20 21 |
# File 'lib/minitest/distributed/reporters/test_order_reporter.rb', line 18 def start @file = File.open(@path, "w+") super end |