7.5. rake stats

With rake stats you get an overview of your Rails project. For our example, it looks like this:
$ rake stats
+----------------------+-------+-------+---------+---------+-----+-------+
| Name                 | Lines |   LOC | Classes | Methods | M/C | LOC/M |
+----------------------+-------+-------+---------+---------+-----+-------+
| Controllers          |    79 |    53 |       2 |       9 |   4 |     3 |
| Helpers              |     4 |     4 |       0 |       0 |   0 |     0 |
| Models               |     8 |     7 |       1 |       0 |   0 |     0 |
| Mailers              |     0 |     0 |       0 |       0 |   0 |     0 |
| Javascripts          |    19 |     0 |       0 |       0 |   0 |     0 |
| Libraries            |     0 |     0 |       0 |       0 |   0 |     0 |
| Controller tests     |    49 |    39 |       1 |       0 |   0 |     0 |
| Helper tests         |     4 |     3 |       1 |       0 |   0 |     0 |
| Model tests          |    13 |    11 |       1 |       0 |   0 |     0 |
| Mailer tests         |     0 |     0 |       0 |       0 |   0 |     0 |
| Integration tests    |    15 |    12 |       1 |       0 |   0 |     0 |
+----------------------+-------+-------+---------+---------+-----+-------+
| Total                |   191 |   129 |       7 |       9 |   1 |    12 |
+----------------------+-------+-------+---------+---------+-----+-------+
  Code LOC: 64     Test LOC: 65     Code to Test Ratio: 1:1.0

$
In this project, we have a total of 64 LOC (Lines Of Code) in the controllers, helpers and models. Plus we have a total of 65 LOC for tests. This gives us a test relation of 1:1.0, which should be the principal objective. Logically, this does not say anything about the quality of tests.

Thank you for your support and the visibility by linking to this website on Twitter and Facebook. That helps a lot!