Skip to content

Instantly share code, notes, and snippets.

@tjennings
Created May 6, 2010 03:36
Show Gist options
  • Save tjennings/391750 to your computer and use it in GitHub Desktop.
Save tjennings/391750 to your computer and use it in GitHub Desktop.
(testing "describe syntax"
(describe "single assertion"
(= (+ 1 1) 2))
(context "many assertions"
(describe "plus"
(= (+ 1 1) 2)
"minus"
(= (- 2 1) 1)
"divide"
(= (/ 4 2) 2)))
(context "a 'with' (or given)"
(with [x 2 z 4]
(describe "x and z are in my scope"
(= (+ x z) (+ x z))
"but it fails if I do my math wrong"
(= (+ x z) (+ x 2))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment