test now is fine

master
jem 5 years ago
parent 999b041925
commit 965ceda614

@ -1,19 +1,30 @@
(defproject dda/cryogen-core "0.2.0-SNAPSHOT"
:description "Cryogen's compiler"
:url "https://github.com/cryogen-project/cryogen-core"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.10.0"]
[camel-snake-kebab "0.4.1"]
[cheshire "5.9.0"]
[clj-rss "0.2.5"]
[clj-text-decoration "0.0.3"]
[enlive "1.1.6"]
[hawk "0.2.11"]
[hiccup "1.0.5"]
[io.aviso/pretty "0.1.37"]
[me.raynes/fs "1.4.6"]
[pandect "0.6.1"]
[selmer "1.12.17"]]
:deploy-repositories [["snapshots" :clojars]
["releases" :clojars]])
:description "Cryogen's compiler"
:url "https://github.com/cryogen-project/cryogen-core"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.10.0"]
[camel-snake-kebab "0.4.1"]
[cheshire "5.9.0"]
[clj-rss "0.2.5"]
[clj-text-decoration "0.0.3"]
[enlive "1.1.6"]
[hawk "0.2.11"]
[hiccup "1.0.5"]
[io.aviso/pretty "0.1.37"]
[me.raynes/fs "1.4.6"]
[pandect "0.6.1"]
[selmer "1.12.17"]]
:deploy-repositories [["snapshots" :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 []}})

@ -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])

@ -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")))))
(sut/copy-resources-from-theme theme target)
(and (verify-dir-exists (str target "/js"))
(verify-file-exists (str target "/js/dummy.js"))))))
Loading…
Cancel
Save