Skip to content

Commit

Permalink
Fix test_deploy.
Browse files Browse the repository at this point in the history
  • Loading branch information
mtyaka committed Feb 11, 2011
1 parent dc29f9c commit e3bf2d0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions test/test_deploy.clj
Expand Up @@ -3,14 +3,14 @@
(:use [clojure.test]
[clojure.java.io :only [file]]
[leiningen.core :only [read-project defproject]]
[leiningen.util.file]))
[leiningen.util.file :only [delete-file-recursively tmp-dir]]))

(def test-project (read-project "test_projects/sample/project.clj"))

(deftest test-deploy
(delete-file-recursively "/tmp/lein-repo" :silently)
(delete-file-recursively (format "%s/lein-repo" tmp-dir) :silently)
(deploy test-project "snapshots")
(let [dir (file "/tmp/lein-repo/nomnomnom/nomnomnom/0.5.0-SNAPSHOT/")
(let [dir (file tmp-dir "lein-repo/nomnomnom/nomnomnom/0.5.0-SNAPSHOT/")
files (.list dir)
year (+ 1900 (.getYear (java.util.Date.)))]
(is (seq files))
Expand Down
4 changes: 3 additions & 1 deletion test_projects/sample/project.clj
Expand Up @@ -17,4 +17,6 @@
:test-selectors {:integration :integration
:default (complement :integration)
:random (fn [_] (> (rand) ~(float 1/2)))
:all (constantly true)})
:all (constantly true)}
:repositories {"snapshots" ~(format "file://%s/lein-repo"
(System/getProperty "java.io.tmpdir"))})

0 comments on commit e3bf2d0

Please sign in to comment.