Skip to content

Commit ff682ef

Browse files
committed
Change expectation for rake stats
1 parent caf90c1 commit ff682ef

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

test/lib/rails_stats/code_statistics_test.rb

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,20 @@
55
describe RailsStats::CodeStatistics do
66
describe "#to_s" do
77
TABLE = <<~EOS
8-
+----------------------+---------+---------+---------+---------+-----+-------+
8+
+-----------------------|------------|----------------+
9+
| Name | Total Deps | 1st Level Deps |
10+
+-----------------------|------------|----------------+
11+
| simplecov-console | 7 | 3 |
12+
| codecov | 4 | 1 |
13+
| rails_stats | 4 | 2 |
14+
| simplecov | 3 | 3 |
15+
| minitest-around | 1 | 1 |
16+
| minitest | 0 | 0 |
17+
| bundler | 0 | 0 |
18+
| byebug | 0 | 0 |
19+
| minitest-spec-context | 0 | 0 |
20+
+-----------------------|------------|----------------+
21+
\n Declared Gems 9 \n Total Gems 17 \n Unpinned Versions 8 \n Github Refs 0 \n \n+----------------------+---------+---------+---------+---------+-----+-------+
922
| Name | Lines | LOC | Classes | Methods | M/C | LOC/M |
1023
+----------------------+---------+---------+---------+---------+-----+-------+
1124
| Channels | 8 | 8 | 2 | 0 | 0 | 0 |
@@ -28,9 +41,11 @@
2841
it "outputs useful stats for a Rails project" do
2942
root_directory = File.expand_path('../../../test/dummy', File.dirname(__FILE__))
3043

31-
assert_output(TABLE) do
44+
out, err = capture_io do
3245
RailsStats::CodeStatistics.new(root_directory).to_s
3346
end
47+
48+
assert_equal TABLE, out
3449
end
3550
end
3651
end

0 commit comments

Comments
 (0)