David--
Worse, even though you sell it as a tool for dealing with legacy code
> (code without tests), it will end up becoming the tool people use
I think this is the part that is of the most concern. That people
will substitute a tool for good judgment. That should not reflect
poorly on BDD or rSpec. It just is what it is. ZenTest has an
analogous facility and I don't think it does a particularly better
job of pulling out stuff to test, nor does it (IMO) decrease the
value or legitimacy of TDD or ZenTest. Whoever wants to use it does,
and others ignore it.
Reading the posts on this list, it seems to me that most posters have
grokked the BDD idea and would be writing their examples first and
describing behaviors. Most, if not all, will spot where their specs
don't align with methods, but rather with a combination of method
invocations. Rcov is, of course, an invaluable tool for discovering
which lines of code simply haven't been run. But, as with all tools,
Rcov only gives you the feedback on whether the code was run, not
whether your example made sense or whether multiple branches were
exercised.
My goal -- and it's worked for me -- was to find a way to break the
inertia of having no specs (clients with legacy code that appears to
work aren't always keen to pay for writing specs) and make me puzzle
out which things make sense to spec as behaviors and which are really
only helpers (and thus candidates to move into private visibility).
I'm not planning to dump much more time into this tool unless there
is a compelling reason to do so, but it's another arrow (perhaps a
bent one :) in the quiver.
--steve
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users