Sha256: 914b488dac02234943b358305e552430e612a966e4835c9e103b4b9f177c286f

Contents?: true

Size: 682 Bytes

Versions: 393

Compression:

Stored size: 682 Bytes

Contents

(ns check-exercises
  (:require [cheshire.core :as json]
            [clojure.string :as string]
            [clojure.test :refer [deftest is run-tests successful?]]))

(defn- ->snake_case [s] (string/replace s \- \_))

(deftest check-exercises
  (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)))))

Version data entries

393 entries across 393 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.179 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.178 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.177 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.176 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.175 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.174 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.173 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.172 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.171 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.170 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.169 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.167 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.166 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.165 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.164 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.163 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.162 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.161 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.160 tracks/clojure/_test/check_exercises.clj