Moving the test too or leave them where they are. I have concerns with both. See this post how I solved my dilemma.

a) you can extract the class and do nothing with the tests. Code in the HelperClass is still covered when running the original tests.

b) extract the tests as well.

c) do it my way ;-)

ad a) If the helper is used by the original class only, Uncle Bob’s advice is to not move the tests. That’s okay but I don’t like the idea that I don’t know where the code is covered anymore. And, if I remove the first class, nothing will mention that there is unused code in the extracted HelperClass.

ad b) If the helper is used by several other classes, it’s clear, it needs it’s own test-file.

ad c) I came to this solution for cases where (a) applies.

Since I use a refactoring-script anyway, I can extend this script to create this “SpecHelper” too. The test in the spec-helper is always the same, therefor it can be a snippet.