improved encapsulation
This commit is contained in:
parent
4e29ea49b5
commit
ce25f94fc3
2 changed files with 11 additions and 3 deletions
|
@ -30,6 +30,10 @@
|
|||
TestDataSpec
|
||||
{:data-spec-file s/Str}))
|
||||
|
||||
(s/defn data-spec-file :- s/Str
|
||||
[runtime-test-data-spec :- RuntimeTestDataSpec]
|
||||
(:data-spec-file runtime-test-data-spec))
|
||||
|
||||
(s/defn read-test-data-spec :- TestDataSpec
|
||||
[resource-url :- s/Str]
|
||||
(aero/read-config resource-url))
|
||||
|
|
|
@ -18,15 +18,19 @@
|
|||
[clojure.test :as t]
|
||||
[clojure.java.io :as io]
|
||||
[clojure.stacktrace :as stack]
|
||||
[schema.core :as s]))
|
||||
[schema.core :as s]
|
||||
[data-test.loader :as loader]))
|
||||
|
||||
(def ^:dynamic
|
||||
*data-test-report-context* nil)
|
||||
|
||||
(def ^:dynamic
|
||||
*target-dir* "target/datatest/")
|
||||
|
||||
(s/defn write-data-test-output
|
||||
[m]
|
||||
(let [data-spec-file (:data-spec-file *data-test-report-context*)
|
||||
output-file (str "target/datatest/" data-spec-file)]
|
||||
(let [data-spec-file (loader/data-spec-file *data-test-report-context*)
|
||||
output-file (str *target-dir* data-spec-file)]
|
||||
(io/make-parents output-file)
|
||||
(spit output-file (merge
|
||||
{:test-event m}
|
||||
|
|
Loading…
Reference in a new issue