add multifile support

This commit is contained in:
jem 2019-05-28 08:44:10 +02:00
parent 86cd3727a0
commit 9eaf2818e1

View file

@ -43,6 +43,16 @@
(map #(str prefix "." % ".edn") (map #(str prefix "." % ".edn")
(range 10))))) (range 10)))))
(s/defn load-data-test-specs :- '(TestDataSpec)
[file-prefix :- s/Str]
(let [file-path (str file-prefix ".edn")]
(try
(read-test-data-spec (io/resource file-path))
(catch IllegalArgumentException e
(throw (ex-info (str "Could not find test spec on " file-path)
{:message "Could not find test spec"
:file-path file-prefix} e))))))
(s/defn load-test-data (s/defn load-test-data
[file-prefix :- s/Str] [file-prefix :- s/Str]
(let [file-path (str file-prefix ".edn")] (let [file-path (str file-prefix ".edn")]