Class: Mutiny::Tests::TestRun
- Inherits:
-
Object
- Object
- Mutiny::Tests::TestRun
- Defined in:
- lib/mutiny/tests/test_run.rb
Instance Attribute Summary collapse
-
#failed_tests ⇒ Object
readonly
Returns the value of attribute failed_tests.
-
#output ⇒ Object
readonly
Returns the value of attribute output.
-
#passed_tests ⇒ Object
readonly
Returns the value of attribute passed_tests.
-
#runtime ⇒ Object
readonly
Returns the value of attribute runtime.
-
#tests ⇒ Object
readonly
Returns the value of attribute tests.
Instance Method Summary collapse
- #executed_count ⇒ Object
- #failed? ⇒ Boolean
-
#initialize(tests:, passed_tests:, failed_tests:, output:, runtime:) ⇒ TestRun
constructor
A new instance of TestRun.
- #passed? ⇒ Boolean
Constructor Details
#initialize(tests:, passed_tests:, failed_tests:, output:, runtime:) ⇒ TestRun
Returns a new instance of TestRun.
6 7 8 9 10 11 12 |
# File 'lib/mutiny/tests/test_run.rb', line 6 def initialize(tests:, passed_tests:, failed_tests:, output:, runtime:) @tests = tests @passed_tests = passed_tests @failed_tests = failed_tests @output = output @runtime = runtime end |
Instance Attribute Details
#failed_tests ⇒ Object (readonly)
Returns the value of attribute failed_tests.
4 5 6 |
# File 'lib/mutiny/tests/test_run.rb', line 4 def failed_tests @failed_tests end |
#output ⇒ Object (readonly)
Returns the value of attribute output.
4 5 6 |
# File 'lib/mutiny/tests/test_run.rb', line 4 def output @output end |
#passed_tests ⇒ Object (readonly)
Returns the value of attribute passed_tests.
4 5 6 |
# File 'lib/mutiny/tests/test_run.rb', line 4 def passed_tests @passed_tests end |
#runtime ⇒ Object (readonly)
Returns the value of attribute runtime.
4 5 6 |
# File 'lib/mutiny/tests/test_run.rb', line 4 def runtime @runtime end |
#tests ⇒ Object (readonly)
Returns the value of attribute tests.
4 5 6 |
# File 'lib/mutiny/tests/test_run.rb', line 4 def tests @tests end |
Instance Method Details
#executed_count ⇒ Object
14 15 16 |
# File 'lib/mutiny/tests/test_run.rb', line 14 def executed_count passed_tests.size + failed_tests.size end |
#failed? ⇒ Boolean
22 23 24 |
# File 'lib/mutiny/tests/test_run.rb', line 22 def failed? !passed? end |
#passed? ⇒ Boolean
18 19 20 |
# File 'lib/mutiny/tests/test_run.rb', line 18 def passed? failed_tests.empty? end |