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.159 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.158 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.157 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.156 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.155 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.154 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.153 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.152 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.151 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.150 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.149 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.148 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.147 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.146 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.145 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.144 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.143 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.142 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.141 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.140 tracks/clojure/_test/check_exercises.clj