Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@sidraval
Created April 22, 2014 01:22
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 sidraval/11162258 to your computer and use it in GitHub Desktop.
Save sidraval/11162258 to your computer and use it in GitHub Desktop.
(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