Skip to content

Commit d91b1be

Browse files
committed
Remove stale bundler-stats table from console output fixture
The gem dependency table was never compared in tests (it was stripped before assertion) and contained outdated values. The fixture now only contains the code stats table that is actually asserted on.
1 parent c29a6f8 commit d91b1be

2 files changed

Lines changed: 5 additions & 20 deletions

File tree

test/fixtures/console-output.txt

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,3 @@
1-
+-----------------------|------------|----------------+
2-
| Name | Total Deps | 1st Level Deps |
3-
+-----------------------|------------|----------------+
4-
| simplecov-console | 8 | 3 |
5-
| codecov | 4 | 1 |
6-
| rails_stats | 4 | 2 |
7-
| simplecov | 3 | 3 |
8-
| minitest-around | 1 | 1 |
9-
| bundler | 0 | 0 |
10-
| byebug | 0 | 0 |
11-
| minitest | 0 | 0 |
12-
| minitest-spec-context | 0 | 0 |
13-
+-----------------------|------------|----------------+
14-
15-
Declared Gems 9
16-
Total Gems 18
17-
Unpinned Versions 6
18-
Github Refs 0
19-
201
+----------------------+---------+---------+---------+---------+---------+-----+-------+
212
| Name | Files | Lines | LOC | Classes | Methods | M/C | LOC/M |
223
+----------------------+---------+---------+---------+---------+---------+-----+-------+

test/lib/rails_stats/code_statistics_test.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,13 @@
1414
RailsStats::CodeStatistics.new(root_directory).to_s
1515
end
1616

17+
# Compare only the code stats portion of the output, skipping the
18+
# bundler-stats gem table which varies across Ruby versions.
19+
code_stats_output = out[out.index("+----------------------+")..-1]
20+
1721
assert_equal(
1822
table.lines.map(&:rstrip).join,
19-
out.lines.map(&:rstrip).join
23+
code_stats_output.lines.map(&:rstrip).join
2024
)
2125
end
2226
end

0 commit comments

Comments
 (0)