Class: Turn::Reporter

### Home Classes Methods

### In Files

- lib/turn/reporter.rb

### Parent

Object

### Methods

- ::new
- #error
- #fail
- #finish_case
- #finish_suite
- #finish_test
- #pass
- #skip
- #start_case
- #start_suite
- #start_test

### Included Modules

- Turn::Colorize

### Files

- History.txt
- LICENSE-GPL2.txt
- LICENSE-MIT.txt
- LICENSE-RUBY.txt
- LICENSE.txt
- Release.txt
- Version.txt

### Class/Module Index

Quicksearch

- Turn
- Turn::Colorize
- Turn::Command
- Turn::Configuration
- Turn::Controller
- Turn::CrossRunner
- Turn::CueReporter
- Turn::DotReporter
- Turn::IsoRunner
- Turn::MarshalReporter
- Turn::MiniRunner
- Turn::OutlineReporter
- Turn::PrettyReporter
- Turn::ProgressReporter
- Turn::Reporter
- Turn::SoloRunner
- Turn::TestCase
- Turn::TestMethod
- Turn::TestRunner
- Turn::TestSuite
- Test
- Test::Unit
- Test::Unit::Failure
- Object
- String

No matching classes.

# Turn::Reporter

There are two distinct way in which a report may be utilized by a Runner: per-call or per-file. The method pass, fail and error are generic, and will be used in either case. A per-call runner will use all the methods of a Reporter, while a per-file runner will use start_case per file, and will not use the start_test and finish_test methods, since those are beyond it's grainularity.

### Attributes

io[R]

Where to send report, defaults to `$stdout`.

### Public Class Methods

new(io, opts={}) click to toggle source

    # File lib/turn/reporter.rb, line 20
    def initialize(io, opts={})
      @io      = io || $stdout
      @trace   = opts[:trace]
      @natural = opts[:natural]
      @verbose = opts[:verbose]
      @mark    = opts[:mark].to_i
    end

### Public Instance Methods

error(exception, message=nil) click to toggle source

Invoked when a test raises an exception.

    # File lib/turn/reporter.rb, line 51
    def error(exception, message=nil)
    end

fail(assertion, message=nil) click to toggle source

Invoked when a test raises an assertion.

    # File lib/turn/reporter.rb, line 47
    def fail(assertion, message=nil)
    end

finish_case(test_case) click to toggle source

Invoked after all tests in a testcase have ben run.

    # File lib/turn/reporter.rb, line 63
    def finish_case(test_case)
    end

finish_suite(test_suite) click to toggle source

After all tests are run, this is the last observable action.

    # File lib/turn/reporter.rb, line 67
    def finish_suite(test_suite)
    end

finish_test(test) click to toggle source

Invoked after a test has been run.

    # File lib/turn/reporter.rb, line 59
    def finish_test(test)
    end

pass(message=nil) click to toggle source

Invoked when a test passes.

    # File lib/turn/reporter.rb, line 43
    def pass(message=nil)
    end

skip(exception, message=nil) click to toggle source

Invoked when a test is skipped.

    # File lib/turn/reporter.rb, line 55
    def skip(exception, message=nil)
    end

start_case(test_case) click to toggle source

Invoked before a testcase is run.

    # File lib/turn/reporter.rb, line 35
    def start_case(test_case)
    end

start_suite(test_suite) click to toggle source

At the very start, before any testcases are run, this is called.

    # File lib/turn/reporter.rb, line 31
    def start_suite(test_suite)
    end

start_test(test) click to toggle source

Invoked before a test is run.

    # File lib/turn/reporter.rb, line 39
    def start_test(test)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.