Skip to content

Commit

Permalink
Proper resource resolution in tests
Browse files Browse the repository at this point in the history
When tests are run, `resources` folder is on the classpath.
  • Loading branch information
dm3 authored and fogus committed Sep 7, 2011
1 parent eebf43f commit ce56099
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/marginalia/test/helpers.clj
Expand Up @@ -34,7 +34,8 @@
`(do
(delete-file-recursively ~test-project-target true)
(.mkdirs (file ~test-project-target))
(~doc-generator ~test-project-src ~test-project-target ~test-metadata)
(binding [marginalia.html/*resources* ""]
(~doc-generator ~test-project-src ~test-project-target ~test-metadata))
(let [~'number-of-generated-pages (count (files-in ~test-project-target))]
;; We need to `deftest` in order for test runners (e.g. `lein test`) to pick up failures
(deftest ~(gensym (str project-name "-"))
Expand Down

0 comments on commit ce56099

Please sign in to comment.