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.119 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.118 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.117 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.116 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.115 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.114 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.113 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.111 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.110 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.109 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.108 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.107 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.106 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.105 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.104 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.103 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.102 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.101 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.100 tracks/clojure/_test/check_exercises.clj
trackler-2.2.1.99 tracks/clojure/_test/check_exercises.clj