When using TDD, I am constantly refactoring out duplicated code into it's own methods. My question is should these methods have tests written against them?...
Hello Dylan, Thanks for your email. On Monday, July 31, 2006, at 4:49:25 PM, you ... Often I do not refactor the tests to test specific new methods, if their...
... Usually when we refactor, the behaviour of the system doesn't change, so there should be no need to change the structure of the tests. I think your use of...
... Dylan, I use something I call the 'method use rule': Whenever I'm writing a method and I need to use a method, I first check to see if it has tests. If it...
... This is only somewhat easy to decipher because we have a whole paragraph of context to help us. Also notice that teh tow adn three letter words don't teg...
Ha! I guess I'm not the only one who used to think his emails were spam and didn't read them. ;) ... [Non-text portions of this message have been removed]...
Hi Dylan, About 90% of the time the functionality proivided by the refactored method is already being tested in the unit test, so I don't really see much of a ...
... This depends on the reader. Someone trained in speed reading would learn to look at an entire paragraph like they look at a picture, and then process the...
Hi Dylan, ... Provided that the refactoring was purely for the purpose of removing duplication, the method will be tested. However, if the method has ...
We are looking for a couple developers that have an Agile/TDD background to join our team. Below is the description. Please contact me directly if you are...
You know I hate people who don't keep up with message board postings and threads - then out of nowhere beg for help. Unfortunately I just can't keep up with...
Hi Lionel, try adding .times(3) to the end of the sensor.should_receive line as in: sensor.should_receive(:read_temperature).and_return { readings.shift...
... Hello Nathan, I saw your post and felt compelled to respond. While I'm not in the job market right now, I am very interested in your company. Not many...
No, I'm not. I don't like code smells any better than anyone else... I just don't see an easy way to avoid it in this particular case. -Kelly ... From:...
There is lots of good discussion in the mailing list archive on this topic. I'd suggest looking at that. There was no definitive answer, and the best advice I...
The only dumb question is one not asked. Create an interface for talking to the database. Create another interface for talking over the network. Create Mocks...
... Actually, I think I missed something and should have explained my question better. The thought I was having was "if you're calling the method, why do you...
Greg, Thanks for responding. I actually saw a couple posts a while back listing the "Dojo" and forwarded it to some people in the Pitt office. If you dont...
Trying to be specific - it's just a little difficult with intellectual property rules and my overwhelming desire not to get sued. The problem I'm having is...
Thanks Mark. Using once() works but it's odd. You get the error "method x called incorrect number of times. <1> expected was <0>". And it comes with like 10...
... "method x ... This is what you should get if you still have the hardcoded return of "12" in place as you have said you expect the method to be called once ...
The function is called because a delegate is listening to an event. This test was designed to make sure that the event and delegate had been properly set up....
Ah, you didn't mention before that you were doing legacy C++ coding... or I missed it... that makes a big difference :-) I would suggest strongly that if you...
... It is a bit harder to scramble the two and three letter words and still leave the first and last letters in their original positions ;) I have developed a...
... Yes. So now, I'm assuming the function doesn't change the state of an object, which is why you're adding a state change. And the point of the question...
I have a set of classes (in code I inherited; I did not write it). The code is crying out for a superclass to be born, with this set of classes inheriting...