This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery.fn.selectText = function(){ | |
var doc = document | |
, element = this[0] | |
, range, selection | |
; | |
if (doc.body.createTextRange) { | |
range = document.body.createTextRange(); | |
range.moveToElementText(element); | |
range.select(); | |
} else if (window.getSelection) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
font: "Helvetica Neue", 800; | |
font: "Times New Roman", 500; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RSpec.configure do |config| | |
config.before(:suite) do | |
DatabaseCleaner.clean_with(:truncation) | |
end | |
config.before(:each) do | |
DatabaseCleaner.strategy = :transaction | |
end | |
config.before(:each) do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://www.martyrestaurants.com/preparate-calde-cluj/preparate-pui-cluj/extra-crispy-chicken.html | |
http://www.martyrestaurants.com/garnituri-cluj/cartofi-copti-cu-rosmarin.html |