Class: Grntest::WorkerResult

Inherits:
BaseResult show all
Defined in:
lib/grntest/worker.rb

Instance Attribute Summary collapse

Attributes inherited from BaseResult

#elapsed_time

Instance Method Summary collapse

Methods inherited from BaseResult

#measure

Constructor Details

#initializeWorkerResult

Returns a new instance of WorkerResult.



26
27
28
29
30
31
32
33
34
# File 'lib/grntest/worker.rb', line 26

def initialize
  super
  @n_tests = 0
  @n_passed_tests = 0
  @n_leaked_tests = 0
  @n_omitted_tests = 0
  @n_not_checked_tests = 0
  @failed_tests = []
end

Instance Attribute Details

#failed_testsObject (readonly)

Returns the value of attribute failed_tests.



25
26
27
# File 'lib/grntest/worker.rb', line 25

def failed_tests
  @failed_tests
end

#n_leaked_testsObject (readonly)

Returns the value of attribute n_leaked_tests.



23
24
25
# File 'lib/grntest/worker.rb', line 23

def n_leaked_tests
  @n_leaked_tests
end

#n_not_checked_testsObject (readonly)

Returns the value of attribute n_not_checked_tests.



24
25
26
# File 'lib/grntest/worker.rb', line 24

def n_not_checked_tests
  @n_not_checked_tests
end

#n_omitted_testsObject (readonly)

Returns the value of attribute n_omitted_tests.



24
25
26
# File 'lib/grntest/worker.rb', line 24

def n_omitted_tests
  @n_omitted_tests
end

#n_passed_testsObject (readonly)

Returns the value of attribute n_passed_tests.



23
24
25
# File 'lib/grntest/worker.rb', line 23

def n_passed_tests
  @n_passed_tests
end

#n_testsObject (readonly)

Returns the value of attribute n_tests.



23
24
25
# File 'lib/grntest/worker.rb', line 23

def n_tests
  @n_tests
end

Instance Method Details

#n_failed_testsObject



36
37
38
# File 'lib/grntest/worker.rb', line 36

def n_failed_tests
  @failed_tests.size
end

#on_test_failure(name) ⇒ Object



48
49
50
# File 'lib/grntest/worker.rb', line 48

def on_test_failure(name)
  @failed_tests << name
end

#on_test_finishObject



40
41
42
# File 'lib/grntest/worker.rb', line 40

def on_test_finish
  @n_tests += 1
end

#on_test_leak(name) ⇒ Object



52
53
54
# File 'lib/grntest/worker.rb', line 52

def on_test_leak(name)
  @n_leaked_tests += 1
end

#on_test_no_checkObject



60
61
62
# File 'lib/grntest/worker.rb', line 60

def on_test_no_check
  @n_not_checked_tests += 1
end

#on_test_omissionObject



56
57
58
# File 'lib/grntest/worker.rb', line 56

def on_test_omission
  @n_omitted_tests += 1
end

#on_test_successObject



44
45
46
# File 'lib/grntest/worker.rb', line 44

def on_test_success
  @n_passed_tests += 1
end