From 5168483bf5521fed7d4b656b90f0707435f6a6c5 Mon Sep 17 00:00:00 2001 From: Chris Grayson Date: Sun, 16 Oct 2016 10:17:39 -0500 Subject: [PATCH] fix tests to run with new config --- _test/check_exercises.clj | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/_test/check_exercises.clj b/_test/check_exercises.clj index f9fedb2f..a82666c7 100644 --- a/_test/check_exercises.clj +++ b/_test/check_exercises.clj @@ -6,9 +6,10 @@ (defn- ->snake_case [s] (string/replace s \- \_)) (deftest check-exercises - (doseq [problem ((json/parse-string (slurp "config.json")) "problems") - :let [path-to-problem (partial str "exercises/" problem "/") - problem-tests (symbol (str problem "-test"))]] - (load-file (path-to-problem "src/example.clj")) - (load-file (path-to-problem "test/" (->snake_case problem) "_test.clj")) - (is (successful? (run-tests problem-tests))))) + (doseq [exercise ((json/parse-string (slurp "config.json")) "exercises") + :let [slug (exercise "slug") + path-to-exercise (partial str "exercises/" slug "/") + exercise-tests (symbol (str slug "-test"))]] + (load-file (path-to-exercise "src/example.clj")) + (load-file (path-to-exercise "test/" (->snake_case slug) "_test.clj")) + (is (successful? (run-tests exercise-tests))))) \ No newline at end of file