Skip to content

Instantly share code, notes, and snippets.

@robtarr

robtarr/Consular Secret

Created December 7, 2011 23:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robtarr/7e1651f6f3e7fb79cbfe to your computer and use it in GitHub Desktop.
Save robtarr/7e1651f6f3e7fb79cbfe to your computer and use it in GitHub Desktop.
Code Retreat Ramblings
window do
run 'echo -n -e "\033]0; Project Name - Rails Server \0007"'
before { run 'cd projects/project-folder' }
run "rails s"
tab "named test" do
run 'echo -n -e "\033]0; Project Name - Tests \0007"'
run "guard"
end
tab "named project" do
run 'echo -n -e "\033]0; Project Name - Files \0007"'
run "ls"
end
end
describe Cell do
Given(:cell) { cell = Cell.new }
context "with 0 neighbors" do
Then { cell.lives?(0) == false }
end
context "with 1 neighbor" do
Then { cell.lives?(1) == false }
end
context "with 2 neighbors" do
Then { cell.lives?(2) == true }
end
context "with 3 neighbors" do
Then { cell.lives?(3) == true }
end
context "with 4 neighbors" do
Then { cell.lives?(4).should be_false }
end
end
describe "conways" do
cell = Cell.new
it "should live" do
cell.lives?(0).should be_false
cell.lives?(1).should be_false
cell.lives?(2).should be_true
cell.lives?(3).should be_true
cell.lives?(4).should be_false
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment