diff --git a/README.md b/README.md index 285895d..94eff15 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ Distributed under the Eclipse Public License, the same as Clojure. * Throw a FileNotFoundException instead of failing silently when files in a manifest aren't found * Directory contents are listed in alphabetical order (avoids intermittent failures due to file directory order on Linux) * Rewritten internals, with more reliable and consistent string and filename handling -* Referring to X.js.dieter as X.js is no longer supported +* Referring to assets using different extensions is no longer supported ### Version 0.3.0 * Use v8 for Less, Hamlcoffee and CoffeeScript diff --git a/dieter-core/test/dieter/test/path.clj b/dieter-core/test/dieter/test/path.clj index a0c0110..c2458b7 100644 --- a/dieter-core/test/dieter/test/path.clj +++ b/dieter-core/test/dieter/test/path.clj @@ -7,25 +7,19 @@ (deftest test-cached-file-path (is (= "resources/asset-cache/assets/foo-d259b08a2dfaf8bf776cbadbe85442d3.js" - (cache/cached-file-path "/assets/foo.js" "content string")))) + (cache/cached-file-path "foo.js" "content string")))) (deftest test-find-asset (settings/with-options {:asset-root "test/fixtures"} (testing "relative path" - (let [file (path/find-asset "./javascripts/lib/framework.js")] - (is (re-matches #".*test/fixtures/assets/javascripts/(\./)?lib/framework.js$" + (let [file (io/file (path/find-asset "./javascripts/lib/framework.js"))] + (is (re-matches #".*test/fixtures/assets/\./javascripts/lib/framework.js$" (.getPath file))) (is (.exists file))) (is (nil? (path/find-asset "./framework.js")))) (testing "no file exists" - (is (nil? (path/find-asset "dontfindme.txt"))))) - - (settings/with-options {:cache-root "test/fixtures"} - (testing "different file extension" - (let [file (path/find-asset "basic.css")] - (is (re-matches #".*test/fixtures/assets/stylesheets/basic.less$" (.getPath file))) - (is (.exists file)))))) + (is (nil? (path/find-asset "dontfindme.txt")))))) (defn file= [f1 f2] (= (.getCanonicalPath (io/file f1))