Last week I talked about a snafu I made while copy-and-pasting some tests. When I mentioned this same story on LinkedIn, I was pointed to a nifty trick which comes from Woody Zuill:
Work from the bottom up
That is to say, when you copy a test for use against a new function, start at the bottom of the copied function, and work your way up making changes. Then change the name of the copied function last.
If I had followed this simple advice, I would not have encountered my problem.
Thanks Woody, for the simple hacking hack!
If you enjoyed this message, subscribe to The Daily Commit to get future messages to your inbox.
Top comments (0)