Skip to content

Commit

Permalink
add multifile support
Browse files Browse the repository at this point in the history
  • Loading branch information
jerger committed May 28, 2019
1 parent 86cd372 commit 9eaf281
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions main/src/data_test/file_loader.clj
Expand Up @@ -43,6 +43,16 @@
(map #(str prefix "." % ".edn")
(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
[file-prefix :- s/Str]
(let [file-path (str file-prefix ".edn")]
Expand Down

0 comments on commit 9eaf281

Please sign in to comment.