Class Test::Spec::TestCase
In: lib/test/spec.rb
Parent: Object

Methods

add   new  

Included Modules

InstanceMethods

Classes and Modules

Module Test::Spec::TestCase::ClassMethods
Module Test::Spec::TestCase::InstanceMethods

Attributes

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

Public Class methods

[Source]

     # File lib/test/spec.rb, line 498
498:   def initialize(name, parent=nil, superclass=Test::Unit::TestCase)
499:     @testcase = Class.new(superclass) {
500:       include InstanceMethods
501:       extend ClassMethods
502:     }
503: 
504:     @@POSITION = @@POSITION + 1
505:     @testcase.init(name, @@POSITION, parent)
506:   end

Public Instance methods

[Source]

     # File lib/test/spec.rb, line 508
508:   def add(&block)
509:     raise ArgumentError, "context needs a block"  if block.nil?
510: 
511:     @testcase.class_eval(&block)
512:     self
513:   end

[Validate]