Class: Grntest::Reporters::InplaceReporter

Inherits:
BaseReporter show all
Defined in:
lib/grntest/reporters/inplace-reporter.rb

Instance Method Summary collapse

Constructor Details

#initialize(tester) ⇒ InplaceReporter

Returns a new instance of InplaceReporter.



23
24
25
26
27
# File 'lib/grntest/reporters/inplace-reporter.rb', line 23

def initialize(tester)
  super
  @last_redraw_time = Time.now
  @minimum_redraw_interval = 0.1
end

Instance Method Details

#on_finish(result) ⇒ Object



89
90
91
92
93
# File 'lib/grntest/reporters/inplace-reporter.rb', line 89

def on_finish(result)
  draw
  puts
  report_summary(result)
end

#on_start(result) ⇒ Object



29
30
31
# File 'lib/grntest/reporters/inplace-reporter.rb', line 29

def on_start(result)
  @test_suites_result = result
end

#on_suite_finish(worker) ⇒ Object



81
82
83
# File 'lib/grntest/reporters/inplace-reporter.rb', line 81

def on_suite_finish(worker)
  redraw
end

#on_suite_start(worker) ⇒ Object



36
37
38
# File 'lib/grntest/reporters/inplace-reporter.rb', line 36

def on_suite_start(worker)
  redraw
end

#on_test_failure(worker, result) ⇒ Object



48
49
50
51
52
53
# File 'lib/grntest/reporters/inplace-reporter.rb', line 48

def on_test_failure(worker, result)
  redraw do
    report_test(worker, result)
    report_failure(result)
  end
end

#on_test_finish(worker, result) ⇒ Object



77
78
79
# File 'lib/grntest/reporters/inplace-reporter.rb', line 77

def on_test_finish(worker, result)
  redraw
end

#on_test_leak(worker, result) ⇒ Object



55
56
57
58
59
60
61
# File 'lib/grntest/reporters/inplace-reporter.rb', line 55

def on_test_leak(worker, result)
  redraw do
    report_test(worker, result)
    report_marker(result)
    report_actual(result) unless result.checked?
  end
end

#on_test_no_check(worker, result) ⇒ Object



70
71
72
73
74
75
# File 'lib/grntest/reporters/inplace-reporter.rb', line 70

def on_test_no_check(worker, result)
  redraw do
    report_test(worker, result)
    report_actual(result)
  end
end

#on_test_omission(worker, result) ⇒ Object



63
64
65
66
67
68
# File 'lib/grntest/reporters/inplace-reporter.rb', line 63

def on_test_omission(worker, result)
  redraw do
    report_test(worker, result)
    report_actual(result)
  end
end

#on_test_start(worker) ⇒ Object



40
41
42
# File 'lib/grntest/reporters/inplace-reporter.rb', line 40

def on_test_start(worker)
  redraw
end

#on_test_success(worker, result) ⇒ Object



44
45
46
# File 'lib/grntest/reporters/inplace-reporter.rb', line 44

def on_test_success(worker, result)
  redraw
end

#on_worker_finish(worker) ⇒ Object



85
86
87
# File 'lib/grntest/reporters/inplace-reporter.rb', line 85

def on_worker_finish(worker)
  redraw
end

#on_worker_start(worker) ⇒ Object



33
34
# File 'lib/grntest/reporters/inplace-reporter.rb', line 33

def on_worker_start(worker)
end