Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
(ns gol-clojure.core-test
(:use clojure.contrib.mock)
(:require [clojure.test :refer :all]
[gol-clojure.core :refer :all]))
(deftest new-val-test
(testing "new-val"
(testing "when the center cell is dead"
(testing "with exactly 3 alive neighbors"
(let [matrix [[1 1 1] [0 0 0] [0 0 0]]]
(expect [sum-excluding-middle (returns 3)]
(is (= 1 (new-val matrix)))))))))
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.