Class Test::Unit::TestCase
In: lib/test_case_extension.rb
Parent: Object

Methods

Public Class methods

Used to disallow helper methods in test specifications.

   Test::Unit::TestCase.disallow_helper!

A test specification can override this behavior by passing the helper name (as a symbol) in the :allow options.

   unit_tests :allow => [:create_something, :destroy_something] do
     test "verify something" do
       ...
     end

     def create_something
       ...
     end

     def destroy_something
       ...
     end
   end

Used to disallow setup methods in test specifications.

   Test::Unit::TestCase.disallow_setup!

A test specification can override this behavior by passing :setup in the :allow options.

   unit_tests :allow => :setup do
     def setup
       ...
     end

     test "verify something" do
       ...
     end
   end

Used to define a test and assign it a descriptive name.

   unit_tests do
     test "verify something" do
       ...
     end
   end

[Validate]