This file contains 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
import Control.Concurrent | |
import System.Console.ANSI | |
-- Logic | |
data Cell = Alive | Dead | |
deriving (Eq, Show) | |
type Neighbours = [Cell] |
This file contains 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
#!/usr/bin/python | |
import unittest | |
class StringCalculatorSpec(unittest.TestCase): | |
def test_returs_0_for_empty_string(self): | |
when_calculating("").the_result_is(0) | |
def test_returns_single_numbers(self): |
This file contains 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
# Response to http://misko.hevery.com/2009/11/17/how-to-get-started-with-tdd/ | |
import unittest | |
class CalculatorTest(unittest.TestCase): | |
def setUp(self): | |
class MockView(object): |
NewerOlder