Class: UnitTest

Inherits
Test::Unit::TestCase
  • Object
show all
Defined in
lib/drumherum/unit_test.rb

You will see a status display for your tests if you use UnitTest instead of Test::Unit::TestCase:

Instance Method Summary (collapse)

Instance Method Details

- (Object) test0

looks like a test, but just prints status information



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/drumherum/unit_test.rb', line 9

def test0 
  name = self.class.to_s.gsub(/^.*::/, '')
  name.gsub!(/^Test/, '')
  name.gsub!(/^[0-9]+/, '')
  if name != 'UnitTest'  
    print "\n #{name} "
  else
   puts
   puts
  end
end