module TestBelt::Callbacks::Suite

Public Class Methods

included(receiver) click to toggle source

Usage:

class SomeTest < Test::Unit::TestCase
  include TestBelt::Callbacks::Suite

  suite_started {
    # anything here runs before the first test for the suite of tests
  }
  suite_finished {
    # anything here runs after the last test for the suite of tests
  }

  should 'do stuff' do
    assert true
  end
end
# File lib/test_belt/callbacks/suite.rb, line 28
def self.included(receiver)
  if !::Test::Unit::TestCase.respond_to?(:suite_started)
    ::Test::Unit::TestCase.send(:extend, ClassMethods)
  end
end