Skip to content

Commit

Permalink
fix tests to run with new config
Browse files Browse the repository at this point in the history
  • Loading branch information
cgrayson committed Oct 16, 2016
1 parent 18af7b0 commit 5168483
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions _test/check_exercises.clj
Expand Up @@ -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)))))

0 comments on commit 5168483

Please sign in to comment.