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 55describe 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 |
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
3651end
You can’t perform that action at this time.
0 commit comments