File tree 1 file changed +3
-4
lines changed
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 1
1
(ns koan-engine.koans
2
2
(:use [clojure.java.io :only [file resource]])
3
- (:require [koan-engine.util :as u]))
3
+ (:require [koan-engine.util :as u]
4
+ [clojure.string :as str]))
4
5
5
6
; ; TODO: Proper koan validation. Accept the path as an argument.
6
7
(defn ordered-koans [answer-path]
24
25
(defn report-error [file-path line error]
25
26
(let [message (or (.getMessage error) (.toString error))]
26
27
(println " \n Now meditate upon"
27
- (str file-path
28
+ (str ( last ( str/split file-path #"/" ))
28
29
(when line (str " :" line))))
29
30
(println " ---------------------" )
30
31
(println " Assertion failed!" )
31
32
(println (.replaceFirst message " ^Assert failed: " " " ))))
32
33
33
34
(defn tests-pass? [dojo-path file-path]
34
35
(u/with-dojo [dojo-path]
35
- (print " Considering" (str file-path " ..." ))
36
- (println )
37
36
(flush )
38
37
(try (load-file file-path)
39
38
true
You can’t perform that action at this time.
0 commit comments