[LRUG] TDD when removing functionality
Ian Kynnersley
iankynnersley at gmail.com
Wed Sep 19 04:20:52 PDT 2012
Cool, thanks everyone.
Consensus seems to be that there isn't a "right" way to do this but that
it's probably best not to add tests to verify that you have removed the
code as the test suite should describe what the app should be doing not
keeping a history of changes.
I think I will remove the code first and verify that the breaking tests are
the ones I'm expecting. It seems to make sense to remove the code from the
view layer down so that I don't break everything all at once.
Lots of commits also seems like a sensible plan.
Thanks again,
Ian
On Wed, Sep 19, 2012 at 11:46 AM, Paul Battley <pbattley at gmail.com> wrote:
> On 19 September 2012 10:45, Ian Kynnersley <iankynnersley at gmail.com>
> wrote:
> > ...
> > Or should I just delete the code, delete the tests, make
> > sure the remaining tests don't fail and stop worrying about it?
>
> This, I think. I don't see the value in testing the absence of
> behaviour in most cases - about the only situation I can readily
> imagine is where it's to fulfil a contractual, legal, or regulatory
> requirement. I don't think a test suite needs to capture the history
> of development, just the current set of operational parameters.
>
> I might do it the other way around, though: delete tests covering the
> functionality, delete the code that satisfies them, then tidy up any
> other breakages caused by unwanted side-effects.
>
> Paul.
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>
--
Ian Kynnersley
http://iankynnersley.co.uk | +44 (0) 7973 420 829 |
http://twitter.com/kpopper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20120919/926bc623/attachment.html>
More information about the Chat
mailing list