[rspec-users] RSpec usage
Jonathan Tron
jonathan.tron.mailings at gmail.com
Sat Feb 17 10:52:44 EST 2007
Le 17 févr. 07 à 10:48, Bryan Helmkamp a écrit :
> Trying to get feel for RSpec usage so I'm taking a straw poll...
Here we go...
> What's the largest project you've used RSpec on in terms of app LOC
> app and spec LOC? Also, how long have you been using RSpec in
> "production" code?
Actually I used RSpec in one unreleased project (deadline 23
March...), here's my rails stats :
+----------------------+-------+-------+---------+---------+-----
+-------+
| Name | Lines | LOC | Classes | Methods | M/C |
LOC/M |
+----------------------+-------+-------+---------+---------+-----
+-------+
| Controllers | 1487 | 1059 | 21 | 132 | 6
| 6 |
| Helpers | 43 | 42 | 0 | 0 | 0
| 0 |
| Models | 1168 | 489 | 23 | 42 | 1
| 9 |
| Libraries | 233 | 145 | 3 | 30 | 10
| 2 |
| Components | 0 | 0 | 0 | 0 | 0
| 0 |
| Model specs | 1697 | 1366 | 2 | 25 | 12 |
52 |
| View specs | 1581 | 1161 | 0 | 0 | 0
| 0 |
| Controller specs | 5998 | 4741 | 0 | 168 | 0 |
26 |
| Helper specs | 1581 | 1161 | 0 | 0 | 0
| 0 |
+----------------------+-------+-------+---------+---------+-----
+-------+
| Total | 13788 | 10164 | 49 | 397 | 8 |
23 |
+----------------------+-------+-------+---------+---------+-----
+-------+
Code LOC: 1735 Test LOC: 8429 Code to Test Ratio: 1:4.9
My code to test ratio is a bit high, but I'm really a newbie at both
RSpec AND (T/B)DD in general, so I assumed the more I'll be used to
it the more I can refactor my specs to use less LOC, my RCov code
coverage is around 98% (another one which is probably to high).
FYI, I'm using RSpec/RSpecOnRails trunk and RoR 1.2 Stable branch,
RSpec and RSpecOnRails are both installed as plugin (this only
require minors changes in rake tasks and some plugins like
RSpec::Autotest to use the command in vendor/plugin/rspec/bin/spec if
present and not the RubyGems one).
Jonathan
--
Tron Jonathan
http://jonathan.tron.name
More information about the rspec-users
mailing list