Skip to content

Instantly share code, notes, and snippets.

View victorbrender's full-sized avatar

victor.brender victorbrender

View GitHub Profile
@victorbrender
victorbrender / refactoring_example.rb
Created June 4, 2016 08:08 — forked from mehowte/refactoring_example.rb
Simple refactoring exercises and 2 minute commits version - with updated characterisation tests.
# This is a refactoring exercise.
#
# What to do?
#
# I. Simple refactoring
# 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).