Class: Test::Spec::TestCase

### Home Classes Methods

### In Files

- lib/test/spec.rb

### Parent

Object

### Namespace

- MODULE Test::Spec::TestCase::ClassMethods
- MODULE Test::Spec::TestCase::InstanceMethods

### Methods

- ::new
- #add

### Included Modules

- Test::Spec::TestCase::InstanceMethods

### Files

- README
- ROADMAP
- SPECS

### Class/Module Index

Quicksearch

- Test
- Test::Spec
- Test::Spec::CustomShould
- Test::Spec::DefinitionError
- Test::Spec::Should
- Test::Spec::ShouldNot
- Test::Spec::TestCase
- Test::Spec::TestCase::ClassMethods
- Test::Spec::TestCase::InstanceMethods
- Test::Unit
- Test::Unit::UI
- Test::Unit::UI::RDox
- Test::Unit::UI::RDox::TestRunner
- Test::Unit::UI::SpecDox
- Test::Unit::UI::SpecDox::TestRunner
- Object

No matching classes.

# Test::Spec::TestCase

### Attributes

name[R]
position[R]
testcase[R]

### Public Class Methods

new(name, parent=nil, superclass=Test::Unit::TestCase) click to toggle source

    # File lib/test/spec.rb, line 500
    def initialize(name, parent=nil, superclass=Test::Unit::TestCase)
      @testcase = Class.new(superclass) {
        include InstanceMethods
        extend ClassMethods
      }

      @@POSITION = @@POSITION + 1
      @testcase.init(name, @@POSITION, parent)
    end

### Public Instance Methods

add(&block) click to toggle source

    # File lib/test/spec.rb, line 510
    def add(&block)
      raise ArgumentError, "context needs a block"  if block.nil?

      @testcase.class_eval(&block)
      self
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.