Skip to content

Instantly share code, notes, and snippets.

@neotyk
Created January 17, 2010 16:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neotyk/279445 to your computer and use it in GitHub Desktop.
Save neotyk/279445 to your computer and use it in GitHub Desktop.
(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