method

record

ruby latest stable - Class: MiniTest::Unit

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v2_1_10) is shown here.

record(suite, method, assertions, time, error)
public

Record the result of a single test. Makes it very easy to gather information. Eg:

class StatisticsRecorder < MiniTest::Unit
  def record suite, method, assertions, time, error
    # ... record the results somewhere ...
  end
end

MiniTest::Unit.runner = StatisticsRecorder.new

NOTE: record might be sent more than once per test. It will be sent once with the results from the test itself. If there is a failure or error in teardown, it will be sent again with the error or failure.