Class: Turn::TestMethod

### Home Classes Methods

### In Files

- lib/turn/components/method.rb

### Parent

Object

### Methods

- ::new
- #error!
- #error?
- #fail!
- #fail?
- #pass?
- #skip!
- #skip?
- #to_s

### 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::TestMethod

### Attributes

backtrace[RW]
file[RW]
message[RW]
name[RW]
raised[RW]

### Public Class Methods

new(name) click to toggle source

    # File lib/turn/components/method.rb, line 11
    def initialize(name)
      @name      = name
      @fail      = false
      @error     = false
      @skip      = false
      @raised    = nil
      @message   = nil
      @backtrace = []
    end

### Public Instance Methods

error!(exception) click to toggle source

    # File lib/turn/components/method.rb, line 28
    def error!(exception)
      @fail, @error, @skip = false, true, false
      @raised    = exception
      @message   = exception.message
      @backtrace = exception.backtrace
    end

error?() click to toggle source

    # File lib/turn/components/method.rb, line 43
    def error? ; @error ; end

fail!(assertion) click to toggle source

    # File lib/turn/components/method.rb, line 21
    def fail!(assertion)
      @fail, @error, @skip = true, false, false
      @raised    = assertion
      @message   = assertion.message
      @backtrace = assertion.backtrace
    end

fail?() click to toggle source

    # File lib/turn/components/method.rb, line 42
    def fail?  ; @fail  ; end

pass?() click to toggle source

TODO: should this include `or @skip`?

    # File lib/turn/components/method.rb, line 47
    def pass?  ; !(@fail or @error) ; end

skip!(assertion) click to toggle source

    # File lib/turn/components/method.rb, line 35
    def skip!(assertion)
      @fail, @error, @skip = false, false, true
      @raised    = assertion
      @message   = assertion.message
      @backtrace = assertion.backtrace
    end

skip?() click to toggle source

    # File lib/turn/components/method.rb, line 44
    def skip?  ; @skip  ; end

to_s() click to toggle source

    # File lib/turn/components/method.rb, line 49
    def to_s ; name ; end

[Validate]

Generated with the Darkfish Rdoc Generator 2.