Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Part-07 confusion #6

Open
piperone opened this issue Jul 13, 2015 · 1 comment
Open

Part-07 confusion #6

piperone opened this issue Jul 13, 2015 · 1 comment

Comments

@piperone
Copy link

Part 07 tells us the following:

* Run the tests and you will find that the test fails.
* It's time for the REFACTOR stage. Now that we have a
* failing test, we can go and improve our existing code.

And in Part 18, this comment appears:

* Since our tests are GREEN, maybe now is the time
* to enter the REFACTOR stage and try to improve our
* code.

Part 7 suggests the order is Red - Refactor - Green, while other parts tells us it's Red - Green - Refactor. Which is it?

Thanks!

@kvprashant
Copy link

Quiet late for this conversation but leaving a clarification here for others.

The paragraph before that suggests,

 * You know what, though? I'm not all that pleased
 * with our parse method. There's a fair bit of
 * repetition in there.

To make it more clear, the suggested order for TDD is always Red - Refactor - Green - Improve - Green. The last two stages is what the paragraph above is referring to. This is in cases where new functionality is added or improvements are done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants