Make a legal test name: Convert whitespace, /, . to dashes. Append
-test if collides with name of the thing itself
(defn make-test-name
"Make a legal test name: Convert whitespace, /, . to dashes. Append
-test if collides with name of the thing itself"
[s]
(let [basename (re-gsub #"\s+|/|\." "-" s)]
(if (and (resolve (symbol basename))
(not (.endsWith basename "-test")))
(str basename "-test")
basename)))
Comments top
No comments for make-test-name. Log in to add a comment.