Class: MiniTestQueueRunner

Inherits:
MiniTest::Unit
  • Object
show all
Defined in:
lib/test_queue/runner/minitest4.rb

Instance Method Summary collapse

Instance Method Details

#_run_anythingObject



19
20
21
22
23
# File 'lib/test_queue/runner/minitest4.rb', line 19

def _run_anything(*)
  ret = super
  output.puts
  ret
end

#_run_suite(suite, type) ⇒ Object



25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/test_queue/runner/minitest4.rb', line 25

def _run_suite(suite, type)
  output.print '    '
  output.print suite
  output.print ': '

  start = Time.now
  ret = super
  diff = Time.now - start

  output.puts("  <%.3f>" % diff)
  ret
end

#_run_suites(suites, type) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/test_queue/runner/minitest4.rb', line 6

def _run_suites(suites, type)
  self.class.output = $stdout

  if defined?(ParallelEach)
    # Ignore its _run_suites implementation since we don't handle it gracefully.
    # If we don't do this #partition is called on the iterator and all suites
    # distributed immediately, instead of picked up as workers are available.
    suites.map { |suite| _run_suite suite, type }
  else
    super
  end
end