File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change 5
5
describe RailsStats ::CodeStatistics do
6
6
describe "#to_s" do
7
7
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 +----------------------+---------+---------+---------+---------+-----+-------+
9
22
| Name | Lines | LOC | Classes | Methods | M/C | LOC/M |
10
23
+----------------------+---------+---------+---------+---------+-----+-------+
11
24
| Channels | 8 | 8 | 2 | 0 | 0 | 0 |
28
41
it "outputs useful stats for a Rails project" do
29
42
root_directory = File . expand_path ( '../../../test/dummy' , File . dirname ( __FILE__ ) )
30
43
31
- assert_output ( TABLE ) do
44
+ out , err = capture_io do
32
45
RailsStats ::CodeStatistics . new ( root_directory ) . to_s
33
46
end
47
+
48
+ assert_equal TABLE , out
34
49
end
35
50
end
36
51
end
You can’t perform that action at this time.
0 commit comments