fix test for expected refactoring

This commit is contained in:
jem 2019-05-29 19:18:57 +02:00
parent f3c486a733
commit ce093d4cbf

View file

@ -17,27 +17,19 @@
(:require (:require
[clojure.test :refer :all] [clojure.test :refer :all]
[clojure.java.io :as io] [clojure.java.io :as io]
[schema.core :as s] [data-test.loader :as loader]
[data-test.loader :as fl]
[data-test :as sut])) [data-test :as sut]))
; -------------------- explicit version ------------------ ; -------------------- explicit version ------------------
(deftest should-test-with-data-explicit-version (deftest should-test-with-data-explicit-version
(let [testdata (fl/read-test-data-spec (io/resource "data_test_test/should-test-with-data-explicit-version.edn")) (let [testdata (loader/read-test-data-spec (io/resource "data_test_test/should-test-with-data-explicit-version.edn"))
{:keys [input expectation]} testdata] {:keys [input expected]} testdata]
(is (= expectation (is (= expected
input)))) input))))
; ---------------------------- macro ----------------------------- ; ---------------------------- macro -----------------------------
(sut/defdatatest should-test-with-data-macro-version [input expectation] (sut/defdatatest should-test-with-data-macro-version [input expected]
(is (= input expectation))) (is (= input expected)))
(sut/defdatatest should-test-multiple-specs [input expectation] (sut/defdatatest should-test-multiple-specs [input expected]
(is (= input expectation))) (is (= input expected)))
(macroexpand-1 '(sut/defdatatest should-test-with-data-macro-version [input expectation] (is (= 1 1))))
((-> #'should-test-with-data-macro-version meta :test))
(meta #'should-test-with-data-macro-version)