Created
January 17, 2010 16:53
-
-
Save neotyk/279445 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns test-clean | |
(:refer-clojure :exclude [compile]) | |
(:use [leiningen.core :only [read-project defproject]] | |
[leiningen.deps :only [deps]] | |
[leiningen.clean :only [clean]] | |
[leiningen.compile :only [compile]] :reload-all) | |
(:use [clojure.test] | |
[clojure.contrib.set] | |
[clojure.contrib.java-utils :only [file]])) | |
(def test-project (read-project "sample/project.clj")) | |
(deftest test-clean | |
(deps test-project) ; to have lib/ | |
(compile test-project) ; and classes/ | |
(clean test-project) ; test cleaning | |
(doseq [name ["lib" "classes"]] | |
(is (not (.exists (file "sample" name))) (str name " should not exist")))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment