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.



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

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.



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

def failed_tests
  @failed_tests
end

#n_leaked_testsObject (readonly)

Returns the value of attribute n_leaked_tests.



21
22
23
# File 'lib/grntest/worker.rb', line 21

def n_leaked_tests
  @n_leaked_tests
end

#n_not_checked_testsObject (readonly)

Returns the value of attribute n_not_checked_tests.



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

def n_not_checked_tests
  @n_not_checked_tests
end

#n_omitted_testsObject (readonly)

Returns the value of attribute n_omitted_tests.



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

def n_omitted_tests
  @n_omitted_tests
end

#n_passed_testsObject (readonly)

Returns the value of attribute n_passed_tests.



21
22
23
# File 'lib/grntest/worker.rb', line 21

def n_passed_tests
  @n_passed_tests
end

#n_testsObject (readonly)

Returns the value of attribute n_tests.



21
22
23
# File 'lib/grntest/worker.rb', line 21

def n_tests
  @n_tests
end

Instance Method Details

#n_failed_testsObject



34
35
36
# File 'lib/grntest/worker.rb', line 34

def n_failed_tests
  @failed_tests.size
end

#on_test_failure(name) ⇒ Object



46
47
48
# File 'lib/grntest/worker.rb', line 46

def on_test_failure(name)
  @failed_tests << name
end

#on_test_finishObject



38
39
40
# File 'lib/grntest/worker.rb', line 38

def on_test_finish
  @n_tests += 1
end

#on_test_leak(name) ⇒ Object



50
51
52
# File 'lib/grntest/worker.rb', line 50

def on_test_leak(name)
  @n_leaked_tests += 1
end

#on_test_no_checkObject



58
59
60
# File 'lib/grntest/worker.rb', line 58

def on_test_no_check
  @n_not_checked_tests += 1
end

#on_test_omissionObject



54
55
56
# File 'lib/grntest/worker.rb', line 54

def on_test_omission
  @n_omitted_tests += 1
end

#on_test_successObject



42
43
44
# File 'lib/grntest/worker.rb', line 42

def on_test_success
  @n_passed_tests += 1
end