Karsten Schmidt
unread,Feb 3, 2014, 5:53:12 PM2/3/14Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to clo...@googlegroups.com
Hi,
I've been getting quite excited about integrating Speclj via its
auto-runner into my mixed CLJ/CLJS Org-mode/Babel setup, but now
feeling a bit lost how to go about wrapping a number of test
characteristics ("(it)" forms in speclj parlance) into re-usable
units. In the assertions below I'd like to parameterize the "+" calls
(i.e.. replace with other math ops), but the docs are pretty
slim/non-existent about how one could form modules/groups of such
parameterized tests. It doesn't seem to be possible to just wrap those
within a function:
(describe "blah"
(with a2 (vec2 1 2))
(with b2 (vec2 10 20))
;; FIXME how to group these as unit?
(it "a2 n m" (should= (+ @a2 @b2) (+ @a2 10 20)))
(it "a2 b2 m" (should= (+ (+ @a2 @b2) 20) (+ @a2 @b2 20)))
(it "a2 b2 b2" (should= (+ (+ @a2 @b2) @b2) (+ @a2 @b2 @b2)))
(it "a2 n b2" (should= (+ (+ @a2 10) @b2) (+ @a2 10 @b2))))
Any pointers please? Is it even possible? If not, isn't this a fairly
common use case?
Thanks!