Skip to content

Instantly share code, notes, and snippets.

@doesterr
doesterr / refactoring_example.rb
Created July 19, 2012 00:23 — forked from mehowte/refactoring_example.rb
Simple refactoring exercise
# This is a simple refactoring exercise.
#
# What to do?
#
# 1. Look at the code of the class CorrectAnswerBehavior
# 2. Try to see what it does by running `ruby refactoring_example.rb`
# 3. Record characterisation tests by running `ruby refactoring_example.rb --record`
# 4. Make the code beautiful;)
# 5. You are allowed to modify only the code between markers (REFACTORING START/REFACTORING END).
# 6. Test must pass! You can run them with command `ruby refactoring_example.rb --test`