mirror of
https://github.com/edgecase/ruby_koans.git
synced 2026-04-15 07:23:19 -04:00
re-wrote a bit of explanation of red/green/refactor
This commit is contained in:
committed by
Marc Peabody
parent
e225b1612c
commit
73805b3e0e
@@ -59,8 +59,9 @@ Windows is the same thing
|
|||||||
In test-driven development the mantra has always been, red, green, refactor. Write a
|
In test-driven development the mantra has always been, red, green, refactor. Write a
|
||||||
failing test and run it (red), make the test pass (green), then refactor it (that is
|
failing test and run it (red), make the test pass (green), then refactor it (that is
|
||||||
look at the code and see if you can make it any better. In this case you will need
|
look at the code and see if you can make it any better. In this case you will need
|
||||||
to run the koan and see it fail (refactor), make the test pass (green), then take a
|
to run the koan and see it fail (red), make the test pass (green), then take a
|
||||||
moment and reflect upon the test to see what it is teaching you.
|
moment and reflect upon the test to see what it is teaching you and improve the
|
||||||
|
code to better communicate its intent (refactor).
|
||||||
|
|
||||||
The very first time you run it you will see the following output:
|
The very first time you run it you will see the following output:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user