Skip to content

Commit

Permalink
added comments to explain my test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
ckirkendall committed Jul 18, 2011
1 parent 066f4d0 commit f670e41
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/cljgiven/test/core.clj
Expand Up @@ -2,6 +2,8 @@
(:use [cljgiven.core])
(:use [clojure.test]))

;simple test of basic structure

(defspec basic-spec
(Given [t1 (+ 1 x)
t2 (- 2 t1)])
Expand All @@ -15,6 +17,9 @@
(Then (= 2 result2)))) ;this test is designed to fail


;testing the sub context and the
;proper handling of of overriding
;stack by a When
(defspec stack
(Given [stack init-obj])
(Context "testing a vector as a stack"
Expand All @@ -32,4 +37,6 @@
(Then (= '( 2 1 3) stack))
(Context "testing pop on a list"
(When stack (pop stack))
(Then (= '(1 3) stack)))))
(Then (= '(1 3) stack)))))


0 comments on commit f670e41

Please sign in to comment.