Class: Grntest::TestSuitesResult
- Inherits:
-
BaseResult
- Object
- BaseResult
- Grntest::TestSuitesResult
- Defined in:
- lib/grntest/test-suites-runner.rb
Instance Attribute Summary collapse
-
#n_total_tests ⇒ Object
Returns the value of attribute n_total_tests.
-
#workers ⇒ Object
Returns the value of attribute workers.
Attributes inherited from BaseResult
Instance Method Summary collapse
-
#initialize ⇒ TestSuitesResult
constructor
A new instance of TestSuitesResult.
- #n_failed_tests ⇒ Object
- #n_leaked_tests ⇒ Object
- #n_not_checked_tests ⇒ Object
- #n_omitted_tests ⇒ Object
- #n_passed_tests ⇒ Object
- #n_tests ⇒ Object
- #pass_ratio ⇒ Object
Methods inherited from BaseResult
Constructor Details
#initialize ⇒ TestSuitesResult
Returns a new instance of TestSuitesResult.
28 29 30 31 32 |
# File 'lib/grntest/test-suites-runner.rb', line 28 def initialize super @workers = [] @n_total_tests = 0 end |
Instance Attribute Details
#n_total_tests ⇒ Object
Returns the value of attribute n_total_tests.
27 28 29 |
# File 'lib/grntest/test-suites-runner.rb', line 27 def n_total_tests @n_total_tests end |
#workers ⇒ Object
Returns the value of attribute workers.
26 27 28 |
# File 'lib/grntest/test-suites-runner.rb', line 26 def workers @workers end |
Instance Method Details
#n_failed_tests ⇒ Object
51 52 53 |
# File 'lib/grntest/test-suites-runner.rb', line 51 def n_failed_tests collect_count(:n_failed_tests) end |
#n_leaked_tests ⇒ Object
55 56 57 |
# File 'lib/grntest/test-suites-runner.rb', line 55 def n_leaked_tests collect_count(:n_leaked_tests) end |
#n_not_checked_tests ⇒ Object
63 64 65 |
# File 'lib/grntest/test-suites-runner.rb', line 63 def n_not_checked_tests collect_count(:n_not_checked_tests) end |
#n_omitted_tests ⇒ Object
59 60 61 |
# File 'lib/grntest/test-suites-runner.rb', line 59 def n_omitted_tests collect_count(:n_omitted_tests) end |
#n_passed_tests ⇒ Object
47 48 49 |
# File 'lib/grntest/test-suites-runner.rb', line 47 def n_passed_tests collect_count(:n_passed_tests) end |
#n_tests ⇒ Object
43 44 45 |
# File 'lib/grntest/test-suites-runner.rb', line 43 def n_tests collect_count(:n_tests) end |
#pass_ratio ⇒ Object
34 35 36 37 38 39 40 41 |
# File 'lib/grntest/test-suites-runner.rb', line 34 def pass_ratio n_target_tests = n_tests - n_not_checked_tests if n_target_tests.zero? 0 else (n_passed_tests / n_target_tests.to_f) * 100 end end |