test now is fine

This commit is contained in:
jem 2019-11-29 16:44:29 +01:00
parent 999b041925
commit 965ceda614
3 changed files with 44 additions and 22 deletions

View file

@ -16,4 +16,15 @@
[pandect "0.6.1"]
[selmer "1.12.17"]]
:deploy-repositories [["snapshots" :clojars]
["releases" :clojars]])
["releases" :clojars]]
:source-paths ["src"]
:resource-paths ["resources"]
:profiles {:dev {:source-paths ["test"]
:resource-paths ["test-resources"]
:dependencies []
:leiningen/reply
{:dependencies [[org.slf4j/jcl-over-slf4j "1.8.0-beta0"]]
:exclusions [commons-logging]}}
:test {:source-paths ["test"]
:resource-paths ["test-resources"]
:dependencies []}})

View file

@ -2,3 +2,6 @@
(:require [clojure.java.io :as io]
[clojure.string :as s]
[me.raynes.fs :as fs]))
(defn copy-resources-from-theme
[theme target])

View file

@ -1,14 +1,22 @@
(ns cryogen-core.classpath-able-io-test
(:require [clojure.test :refer :all]
[clojure.string :as s]
[cryogen-core.io :as sut]))
[clojure.java.io :as io]
[cryogen-core.classpath-able-io :as sut]))
(def theme "bootstrap4-test")
(def target "target/tmp")
(defn verify-file-exists [path]
(.exists (io/file path)))
(defn verify-dir-exists [path]
(and (verify-file-exists path)
(.isDirectory (io/file path))))
(deftest test-copy-resources-from-theme
(is (do
(sut/copy-resources-from-theme theme target)
(verify-dir-exists (str target "/js")
(verify-file-exists (str target "/js/dummy.js")))))
(and (verify-dir-exists (str target "/js"))
(verify-file-exists (str target "/js/dummy.js"))))))