From 965ceda614bce61425e3e8fff81adecbbf395c9f Mon Sep 17 00:00:00 2001 From: jem Date: Fri, 29 Nov 2019 16:44:29 +0100 Subject: [PATCH] test now is fine --- project.clj | 47 ++++++++++++-------- src/cryogen_core/classpath_able_io.clj | 3 ++ test/cryogen_core/classpath_able_io_test.clj | 16 +++++-- 3 files changed, 44 insertions(+), 22 deletions(-) diff --git a/project.clj b/project.clj index 1fedae3..41462bb 100644 --- a/project.clj +++ b/project.clj @@ -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 []}}) diff --git a/src/cryogen_core/classpath_able_io.clj b/src/cryogen_core/classpath_able_io.clj index 27e1c58..7c06e5e 100644 --- a/src/cryogen_core/classpath_able_io.clj +++ b/src/cryogen_core/classpath_able_io.clj @@ -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]) \ No newline at end of file diff --git a/test/cryogen_core/classpath_able_io_test.clj b/test/cryogen_core/classpath_able_io_test.clj index c0470c2..313311d 100644 --- a/test/cryogen_core/classpath_able_io_test.clj +++ b/test/cryogen_core/classpath_able_io_test.clj @@ -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"))))) \ No newline at end of file + (sut/copy-resources-from-theme theme target) + (and (verify-dir-exists (str target "/js")) + (verify-file-exists (str target "/js/dummy.js")))))) \ No newline at end of file