Class: Protest::Reports::Turn

Inherits:
Protest::Report show all
Includes:
Utils::ColorfulOutput, Utils::Summaries
Defined in:
lib/protest/reports/turn.rb

Overview

This report displays each test on a separate line with failures being displayed immediately instead of at the end of the tests.

You might find this useful when running a large test suite, as it can be very frustrating to see a failure (.…F…) and then have to wait until all the tests finish before you can see what the exact failure was.

This report is based on the output displayed by TURN, Test::Unit Reporter (New) by Tim Pease.

Constant Summary collapse

PASS =
"PASS"
FAIL =
"FAIL"
ERROR =
"ERROR"
PENDING =
"PENDING"

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Utils::ColorfulOutput

colors, #print, #puts

Methods included from Utils::Summaries

#summarize_errors, #summarize_pending_tests, #summarize_test_totals

Methods inherited from Protest::Report

#add_assertion, #assertions, #errors, #failures, #failures_and_errors, on, #passes, #pendings, #tests, #time_elapsed, #total_tests

Constructor Details

#initialize(stream = STDOUT) ⇒ Turn

Set the stream where the report will be written to. STDOUT by default.



24
25
26
# File 'lib/protest/reports/turn.rb', line 24

def initialize(stream=STDOUT)
  @stream = stream
end

Instance Attribute Details

#streamObject (readonly)

:nodoc:



16
17
18
# File 'lib/protest/reports/turn.rb', line 16

def stream
  @stream
end