Class: Minitest::Queue::TestTimeRecorder
- Inherits:
-
Reporters::BaseReporter
- Object
- Reporters::BaseReporter
- Minitest::Queue::TestTimeRecorder
- Defined in:
- lib/minitest/queue/test_time_recorder.rb
Instance Method Summary collapse
-
#initialize(build:, **options) ⇒ TestTimeRecorder
constructor
A new instance of TestTimeRecorder.
- #record(test) ⇒ Object
Constructor Details
#initialize(build:, **options) ⇒ TestTimeRecorder
Returns a new instance of TestTimeRecorder.
5 6 7 8 |
# File 'lib/minitest/queue/test_time_recorder.rb', line 5 def initialize(build:, **) super() @build = build end |
Instance Method Details
#record(test) ⇒ Object
10 11 12 13 14 |
# File 'lib/minitest/queue/test_time_recorder.rb', line 10 def record(test) return unless test.passed? test_duration_in_milliseconds = test.time * 1000 @build.record(test.name, test_duration_in_milliseconds) end |