The objective of this kata is to practice refactoring. This kata motivates the need for refactoring as follows:
- The implementation is spaghetti code, and difficult to glean context.
- The tests of the current implementation pass, but there are a number of pending tests.
- You are asked to implement the code to get the pending tests to pass.
- This isn't easy, because the implementation is so messy.
- Consider using the passing tests to refactor the code to make it more habitable before implementing new functionality. Also known as a preparatory refactoring.
- Refactor the existing code to be in a clean and understandable structure
- The code should be easily understandable
- All tests shoult be passing (including the pending ones)
- Be creative and have fun. Show us your coding style (how does good code look like for you?)
- Try to have small and descriptive commits
- Make a copy of this repository (no forks please)
- Begin refactoring the existing
lib/gilded_rose.rb
class. - Make the pending tests pass
- Send us the link to the solution
Here are the requirements as given in the original version of the kata. It may help you to understand the problem domain if you know that the Gilded Rose is an inn from the World of Warcraft.