3fernandez / refactoring_and_fun

It's just a simple "messy" ruby code that I'm going to try to refactor and leave better that I found while having fun. 😁

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gilded Rose Kata in Ruby

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.

Good solutions

  • Refactor the existing code to be in a clean and understandable structure (feel free to create additional files)
  • 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

Where to Start

  • 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

Original Requirements

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.

About

It's just a simple "messy" ruby code that I'm going to try to refactor and leave better that I found while having fun. 😁


Languages

Language:JavaScript 70.3%Language:HTML 25.8%Language:Ruby 2.3%Language:CSS 1.6%