Before you start:
Try not to read ahead. Do one task at a time. The trick is to learn to work incrementally. Make sure you only test for correct inputs. there is no need to test for invalid inputs for this kata
String Calculator
Before you start:
Try not to read ahead. Do one task at a time. The trick is to learn to work incrementally. Make sure you only test for correct inputs. there is no need to test for invalid inputs for this kata
String Calculator
.rvmrc |
source "https://rugygems.org" | |
gem 'rspec' |
class Rectangle | |
attr_accessor :left | |
def initialize(surface) | |
@surface = surface | |
end | |
def constrain | |
@left = @surface.left if @left > @surface.left | |
end |
*.swp | |
snaps/ |
source :rubygems | |
gem "rspec" |
# See: http://www.codecademy.com/forum_questions/4f97524f1a89c30003000a62 | |
require "./rules" | |
class Answer | |
def initialize(items = []) | |
@items = items | |
end | |
def for(number) | |
index = number > 0 ? number - 1 : 0 |
Gemfile Gemfile.lock |
source :rubygems | |
gem "rspec" |
require "rspec" | |
Object.class_eval do | |
alias :must :should | |
alias :must_not :should_not | |
def should; fail "Should is lame, use must"; end | |
def should_not; fail "Should is lame, use must"; end | |
end |