Skip to content

Instantly share code, notes, and snippets.

@thattommyhall
Created March 22, 2015 15:19
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 thattommyhall/1de6eb31f3af004334a0 to your computer and use it in GitHub Desktop.
Save thattommyhall/1de6eb31f3af004334a0 to your computer and use it in GitHub Desktop.
(expect (partial apply =)
(from-each [[result sexp] {
3 3
true true
2 '(+ 1 1)
;; POTENTIALLY LOADS MORE EGS
}
]
[result (eval sexp)]))
@minimal
Copy link

minimal commented Mar 22, 2015

Just use do-template like are does

(require '[clojure.template :refer [do-template]])

(do-template [expected sexp]
  (expect expected (eval sexp))
  2 '(+ 1 1)
  4 '(* 2 2)
  true true
  3 3)

(if you must)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment