Skip to content

Instantly share code, notes, and snippets.

@robtarr robtarr/Consular Secret
Created Dec 7, 2011

Embed
What would you like to do?
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
You can’t perform that action at this time.