add file as testing context
This commit is contained in:
parent
4240c2744b
commit
15637254ae
1 changed files with 5 additions and 2 deletions
|
@ -33,7 +33,10 @@
|
||||||
:test `(fn []
|
:test `(fn []
|
||||||
(doseq [data-spec# (fl/load-data-test-specs ~namespaced-test-key#)]
|
(doseq [data-spec# (fl/load-data-test-specs ~namespaced-test-key#)]
|
||||||
(let [~(symbol (first bindings)) (:input data-spec#)
|
(let [~(symbol (first bindings)) (:input data-spec#)
|
||||||
~(symbol (second bindings)) (:expectation data-spec#)]
|
~(symbol (second bindings)) (:expectation data-spec#)
|
||||||
~@body)))
|
data-spec-file# (:data-spec-file data-spec#)]
|
||||||
|
(binding [ct/*testing-contexts*
|
||||||
|
(conj ct/*testing-contexts* data-spec-file#)]
|
||||||
|
~@body))))
|
||||||
:data-spec-key namespaced-test-key#)
|
:data-spec-key namespaced-test-key#)
|
||||||
(fn [] (ct/test-var (var ~n)))))))
|
(fn [] (ct/test-var (var ~n)))))))
|
||||||
|
|
Loading…
Reference in a new issue