Skip to content

Commit

Permalink
Moved from Maven to Leiningen
Browse files Browse the repository at this point in the history
  • Loading branch information
Flamefork committed Feb 12, 2010
1 parent 3870574 commit ddea439
Show file tree
Hide file tree
Showing 33 changed files with 24 additions and 90 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
README.html
target
pom.xml
classes
lib


*.iml
Expand Down
78 changes: 0 additions & 78 deletions pom.xml

This file was deleted.

10 changes: 10 additions & 0 deletions project.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(defproject
fleet "0.9.2-SNAPSHOT"
:description "Templating System for Clojure"
:url "http://github.com/Flamefork/fleet"

:dependencies [[org.clojure/clojure "1.1.0"]
[org.clojure/clojure-contrib "1.1.0"]]
:dev-dependencies [[lein-clojars "0.5.0-SNAPSHOT"]
[lein-javac "0.0.2-SNAPSHOT"]]
:repositories [["clojure-releases" "http://build.clojure.org/releases"]])
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
[fleet parser builder]))

(deftest parse-test
(let [tpl (slurp "src/test/fleet/second/post_tpl.fleet")
ast (slurp "src/test/fleet/second/post_tpl.ast.clj")]
(let [tpl (slurp "test/resources/second/post_tpl.fleet")
ast (slurp "test/resources/second/post_tpl.ast.clj")]
(is (= (parse tpl) (read-string ast)))))

(deftest build-test
(let [ast (read-string (slurp "src/test/fleet/second/post_tpl.ast.clj"))
clj (slurp "src/test/fleet/second/post_tpl.clj")]
(let [ast (read-string (slurp "test/resources/second/post_tpl.ast.clj"))
clj (slurp "test/resources/second/post_tpl.clj")]
; (println (build '(post) ast))
(is (= (build '(post) ast) clj))))
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions src/test/clojure/fleet_api_test.clj → test/fleet_api_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
"html" :xml
:fleet :bypass])

(fleet-ns tpl "src/test/fleet/ns" filters)
(fleet-ns tpl "test/resources/ns" filters)

(deftest fleet-ns-test
(let [initial-ns *ns*]
(fleet-ns 'tpl "src/test/fleet/ns" filters)
(fleet-ns 'tpl "test/resources/ns" filters)
(is (= *ns* initial-ns))
(is (=
(tpl.posts/posts-html test-posts test-data)
(slurp "src/test/fleet/ns/posts/posts.html")))))
(slurp "test/resources/ns/posts/posts.html")))))

(deftest error-reporting-test
(let [e (is (thrown? ClassCastException (tpl.posts/exceptional)))
Expand All @@ -32,9 +32,9 @@
(deftest cross-lang-test
(is (=
(tpl.posts/update (first test-posts))
(slurp "src/test/fleet/ns/posts/update.js"))))
(slurp "test/resources/ns/posts/update.js"))))

(deftest layout-test
(is (=
(tpl/layout (tpl.posts/posts-html test-posts test-data))
(slurp "src/test/fleet/ns/posts/posts_with_layout.html"))))
(slurp "test/resources/ns/posts/posts_with_layout.html"))))
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
(defmacro fileet
"Convinient way to define test templates"
[args filename]
`(fleet ~args (slurp (str "src/test/fleet/" ~filename ".fleet")) {:escaping :xml}))
`(fleet ~args (slurp (str "test/resources/" ~filename ".fleet")) {:escaping :xml}))

(defmacro readhtml
"Convinient way to read test data"
[filename]
`(slurp (str "src/test/fleet/" ~filename ".html")))
`(slurp (str "test/resources/" ~filename ".html")))

(def test-posts
[{:body "First Post" :tags ["tag1" "tag2" "tag3"]},
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit ddea439

Please sign in to comment.