Class: M::Runners::TestUnit

Inherits:
Base
  • Object
show all
Defined in:
lib/m/runners/test_unit.rb

Instance Method Summary collapse

Instance Method Details

#run(test_arguments) ⇒ Object



12
13
14
# File 'lib/m/runners/test_unit.rb', line 12

def run test_arguments
  Test::Unit::AutoRunner.run false, nil, test_arguments
end

#suitesObject



4
5
6
7
8
9
10
# File 'lib/m/runners/test_unit.rb', line 4

def suites
  if Test::Unit::TestCase.respond_to? :test_suites
    Test::Unit::TestCase.test_suites
  else
    Test::Unit::TestCase::DESCENDANTS
  end
end

#test_methods(suite_class) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/m/runners/test_unit.rb', line 16

def test_methods suite_class
  if suite_class.respond_to? :test_methods
    suite_class.test_methods
  else
    suite_class.public_instance_methods(true).grep(/^test/).map(&:to_s)
  end
end