Class: Turn::ToptenDecorator

### Home Classes Methods

### In Files

- lib/turn/decorators/topten_decorator.rb

### Parent

Object

### Methods

- ::new
- #finish_suite
- #finish_test
- #method_missing
- #start_case
- #start_test

### Files

- History.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
- Turn::ToptenDecorator
- Test
- Test::Unit
- Test::Unit::Failure
- Object
- String

No matching classes.

# Turn::ToptenDecorator

### Public Class Methods

new(reporter) click to toggle source

    # File lib/turn/decorators/topten_decorator.rb, line 5
    def initialize(reporter)
      @reporter = reporter
    end

### Public Instance Methods

finish_suite(suite) click to toggle source

    # File lib/turn/decorators/topten_decorator.rb, line 28
    def finish_suite(suite)
      @reporter.finish_suite(suite)
      io.puts
      io.puts Colorize.bold("Top 10 Longest Running Tests")
      top_ten_times.each do |(test_name, time)|
        io.print format_time(time)
        io.puts format_test_name(test_name, time)
      end
      io.puts
    end

finish_test(test) click to toggle source

    # File lib/turn/decorators/topten_decorator.rb, line 23
    def finish_test(test)
      @reporter.finish_test(test)
      test_time_data[test_key(test)][:end] = Time.now
    end

method_missing(m,*args,&block) click to toggle source

    # File lib/turn/decorators/topten_decorator.rb, line 9
    def method_missing(m,*args,&block)
      @reporter.send(m,*args,&block)
    end

start_case(kase) click to toggle source

    # File lib/turn/decorators/topten_decorator.rb, line 13
    def start_case(kase)
      @reporter.start_case(kase)
      @top_ten_current_case = kase
    end

start_test(test) click to toggle source

    # File lib/turn/decorators/topten_decorator.rb, line 18
    def start_test(test)
      @reporter.start_test(test)
      test_time_data[test_key(test)] = {:start => Time.now}
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.