Skip to content

Commit 913a273

Browse files
committed
elaborate refactoring against failing tests
1 parent 6502ee1 commit 913a273

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

chapter_12_organising_test_files.asciidoc

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
11
[[chapter_12_organising_test_files]]
22
== Splitting Our Tests into Multiple Files, and a Generic Wait Helper
33

4-
// RITA: Reword/remove this warning since you have reviewed the chapter text in detail?
5-
.🚧 Warning, chapter update in progress
6-
*******************************************************************************
7-
This chapter is currently in the process of being rewritten for the 3e.
8-
9-
The code listings should all be valid,
10-
and work with Python3.12 + Django 4,
11-
but I haven't reviewed the chapter text in detail yet.
12-
13-
*******************************************************************************
144

155
Back to local development!
166
The next feature we might like to implement is a little input validation.
@@ -894,10 +884,13 @@ Don't forget the "Refactor" in "Red, Green, Refactor"::
894884
((("Red/Green/Refactor")))
895885
896886
Don't refactor against failing tests::
897-
// RITA: Why shouldn't you refactor against failing tests in general? A brief explanation would be nice here for clarity.
898-
* In general!
899-
// RITA: Please clarify the next line. It's somewhat ambiguous. Are you saying that you should refactor against failing tests in the FT you're currently working on?
900-
* But the FT you're currently working on doesn't count.
887+
* In general: refactoring against failing tests can easily introduce new
888+
issues and make it a lot more difficult to spot them.
889+
* Refactoring against failing FTs, however, is often necessary and excusable
890+
because FTs address user stories, focusing on the "what" in development.
891+
They cover extensive parts of the application, and aren't tightly tied to
892+
the code. Unlike unit tests, which focus on the "how" to implement the
893+
functionality, guiding the implementation more directly.
901894
* You can occasionally put a skip on a test which is testing something you
902895
haven't written yet.
903896
* More commonly, make a note of the refactor you want to do, finish what

0 commit comments

Comments
 (0)