prepare for multi-test run
This commit is contained in:
parent
149f1afd90
commit
22227ba979
2 changed files with 3 additions and 4 deletions
|
@ -21,7 +21,7 @@
|
|||
|
||||
(s/defn test-with-data
|
||||
[test-name :- s/Keyword]
|
||||
(runner/run-test (runner/create-test-runner test-name)))
|
||||
(runner/run-tests (runner/create-test-runner test-name)))
|
||||
|
||||
(defmacro defdatatest [name & body]
|
||||
'(do
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
(defprotocol RunTest
|
||||
"Protocol for data driven tests"
|
||||
(name-prefix [dda-test])
|
||||
(run-test [dda-test])
|
||||
(run-tests [dda-test])
|
||||
)
|
||||
|
||||
(s/defn dispatch-by-name :- s/Keyword
|
||||
|
@ -60,7 +60,6 @@
|
|||
(s/defn load-test-data
|
||||
[file-prefix :- s/Str]
|
||||
(let [file-path (str file-prefix ".edn")]
|
||||
(println file-path)
|
||||
(read-data
|
||||
(io/resource file-path))))
|
||||
|
||||
|
@ -68,7 +67,7 @@
|
|||
RunTest
|
||||
(name-prefix [_]
|
||||
(data-file-prefix (:name _)))
|
||||
(run-test [_]
|
||||
(run-tests [_]
|
||||
(let [testdata (load-test-data (data-file-prefix (:name _)))
|
||||
{:keys [input expectation]} testdata]
|
||||
(data-test _ input expectation))))
|
||||
|
|
Loading…
Reference in a new issue