Class: AIRefactor::TestRunners::TestRunDiffReport
- Inherits:
-
Object
- Object
- AIRefactor::TestRunners::TestRunDiffReport
- Defined in:
- lib/ai_refactor/test_runners/test_run_diff_report.rb
Instance Method Summary collapse
- #diff ⇒ Object
-
#initialize(previous_test_run_result, test_run_result) ⇒ TestRunDiffReport
constructor
A new instance of TestRunDiffReport.
- #no_differences? ⇒ Boolean
Constructor Details
#initialize(previous_test_run_result, test_run_result) ⇒ TestRunDiffReport
Returns a new instance of TestRunDiffReport.
6 7 8 9 |
# File 'lib/ai_refactor/test_runners/test_run_diff_report.rb', line 6 def initialize(previous_test_run_result, test_run_result) @current = test_run_result @previous = previous_test_run_result end |
Instance Method Details
#diff ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/ai_refactor/test_runners/test_run_diff_report.rb', line 15 def diff report = "" if @current.example_count != @previous.example_count report += "Example count mismatch: #{@current.example_count} != #{@previous.example_count}" end if @current.failure_count != @previous.failure_count report += "Failure count mismatch: #{@current.failure_count} != #{@previous.failure_count}" end if @current.pending_count != @previous.pending_count report += "Pending count mismatch: #{@current.pending_count} != #{@previous.pending_count}" end report end |
#no_differences? ⇒ Boolean
11 12 13 |
# File 'lib/ai_refactor/test_runners/test_run_diff_report.rb', line 11 def no_differences? @current.example_count == @previous.example_count && @current.failure_count == @previous.failure_count && @current.pending_count == @previous.pending_count end |