Skip to content

Make diff output clearer for test failures #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

andyw8
Copy link

@andyw8 andyw8 commented Apr 4, 2025

  • Add an entry to CHANGELOG.md that links to this PR under the "main (unreleased)" heading. N/A

The other CI issues will need to solved first, but this makes the failure output much easier to read, e.g.:

  1) Failure:
RailsStats::CodeStatistics::#to_s#test_0001_outputs useful stats for a Rails project [test/lib/rails_stats/code_statistics_test.rb:17]:
--- expected
+++ actual
@@ -4,9 +4,9 @@
 " +
 "+-----------------------|------------|----------------+
 " +
-"|     simplecov-console | 7          | 3              |
+"|     simplecov-console | 8          | 3              |
 " +
-"|               codecov | 5          | 2              |
+"|               codecov | 4          | 1              |
 " +
 "|           rails_stats | 4          | 2              |
 " +
@@ -24,17 +24,17 @@
 " +
 "+-----------------------|------------|----------------+
 " +
-"
+"
 " +
-"      Declared Gems   9
+"      Declared Gems   9
 " +
-"         Total Gems   18
+"         Total Gems   18
 " +
-"  Unpinned Versions   8
+"  Unpinned Versions   8
 " +
-"        Github Refs   0
+"        Github Refs   0
 " +
-"
+"
 " +
 "+----------------------+---------+---------+---------+---------+---------+-----+-------+
 " +
@@ -76,4 +76,7 @@
 " +
 "+----------------------+---------+---------+---------+---------+---------+-----+-------+
 " +
-"  Code LOC: 145     Test LOC: 6     Code to Test Ratio: 1:0.0  Files: 34"
+"  Code LOC: 145     Test LOC: 6     Code to Test Ratio: 1:0.0  Files: 34
+" +
+"
+"

@andyw8 andyw8 changed the title Make diff output clear for test failures Make diff output clearer for test failures Apr 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant