Class: DTest::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/dtest/runner.rb

Class Method Summary collapse

Class Method Details

.parse!(argv) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/dtest/runner.rb', line 9

def self.parse!(argv)
  # Command line parser
  res = {}
  xml_path = nil
  opt = OptionParser.new
  opt.on('--color') do |b|
    DTest::Report.color_enabled = b
  end
  opt.on('--xml PATH') do |path|
    res[:xml_path] = path
  end
  opt.parse!(argv)

  res
end

.report(gresult) ⇒ Object



34
35
36
# File 'lib/dtest/runner.rb', line 34

def self.report(gresult)
  Progress.print_result(gresult)
end

.run(files = []) ⇒ Object



25
26
27
28
29
30
31
32
# File 'lib/dtest/runner.rb', line 25

def self.run(files = [])
  files.each do |file|
    load file
  end

  test = Test::Manager::instance.cases
  Global::Manager::instance.harness.start(test)
end