Class: AIRefactor::TestRunners::TestRunResult
- Inherits:
-
Object
- Object
- AIRefactor::TestRunners::TestRunResult
- Defined in:
- lib/ai_refactor/test_runners/test_run_result.rb
Instance Attribute Summary collapse
-
#example_count ⇒ Object
readonly
Returns the value of attribute example_count.
-
#failure_count ⇒ Object
readonly
Returns the value of attribute failure_count.
-
#pending_count ⇒ Object
readonly
Returns the value of attribute pending_count.
-
#stderr ⇒ Object
readonly
Returns the value of attribute stderr.
-
#stdout ⇒ Object
readonly
Returns the value of attribute stdout.
Instance Method Summary collapse
- #exitstatus ⇒ Object
- #failed? ⇒ Boolean
-
#initialize(stdout, stderr, status, example_count = 0, failure_count = 0, pending_count = 0, errored = 0) ⇒ TestRunResult
constructor
A new instance of TestRunResult.
Constructor Details
#initialize(stdout, stderr, status, example_count = 0, failure_count = 0, pending_count = 0, errored = 0) ⇒ TestRunResult
Returns a new instance of TestRunResult.
8 9 10 11 12 13 14 15 16 |
# File 'lib/ai_refactor/test_runners/test_run_result.rb', line 8 def initialize(stdout, stderr, status, example_count = 0, failure_count = 0, pending_count = 0, errored = 0) @stdout = stdout @stderr = stderr @status = status @example_count = example_count @failure_count = failure_count @pending_count = pending_count @errored = errored end |
Instance Attribute Details
#example_count ⇒ Object (readonly)
Returns the value of attribute example_count.
6 7 8 |
# File 'lib/ai_refactor/test_runners/test_run_result.rb', line 6 def example_count @example_count end |
#failure_count ⇒ Object (readonly)
Returns the value of attribute failure_count.
6 7 8 |
# File 'lib/ai_refactor/test_runners/test_run_result.rb', line 6 def failure_count @failure_count end |
#pending_count ⇒ Object (readonly)
Returns the value of attribute pending_count.
6 7 8 |
# File 'lib/ai_refactor/test_runners/test_run_result.rb', line 6 def pending_count @pending_count end |
#stderr ⇒ Object (readonly)
Returns the value of attribute stderr.
6 7 8 |
# File 'lib/ai_refactor/test_runners/test_run_result.rb', line 6 def stderr @stderr end |
#stdout ⇒ Object (readonly)
Returns the value of attribute stdout.
6 7 8 |
# File 'lib/ai_refactor/test_runners/test_run_result.rb', line 6 def stdout @stdout end |
Instance Method Details
#exitstatus ⇒ Object
23 24 25 |
# File 'lib/ai_refactor/test_runners/test_run_result.rb', line 23 def exitstatus @status.exitstatus end |
#failed? ⇒ Boolean
18 19 20 21 |
# File 'lib/ai_refactor/test_runners/test_run_result.rb', line 18 def failed? return true unless @status.success? @errored && @errored.to_i > 0 end |