class Minitest::Perf::Run

Attributes

tests[R]

Public Class Methods

new(started_at = Time.now) click to toggle source
# File lib/minitest/perf/run.rb, line 6
def initialize(started_at = Time.now)
  @tests       = []
  @started_at  = started_at
end

Public Instance Methods

add_test(test) click to toggle source
# File lib/minitest/perf/run.rb, line 23
def add_test(test)
  @tests << test
end
finish(suite, name, now = Time.now) click to toggle source
# File lib/minitest/perf/run.rb, line 15
def finish(suite, name, now = Time.now)
  test_total  = now - @test_start

  add_test Test.new(
    @started_at, suite, name, test_total
  ).tap(&:persist)
end
start(suite, name, now = Time.now) click to toggle source
# File lib/minitest/perf/run.rb, line 11
def start(suite, name, now = Time.now)
  @test_start = now
end