From ad73a77174ba887cf16a50fe98ec2b355cb0d728 Mon Sep 17 00:00:00 2001 From: The-Alchemist Date: Mon, 20 Apr 2026 14:35:59 -0400 Subject: [PATCH] Change resource used for testing resource-response When testing with alternative Clojure implementations the Clojure core namespaces are not guaranteed to be in a jarfile, so change the resource to a pom.properties file, which we know must be in a jar and not on the filesystem (for example, via a Leiningen checkout). Signed-off-by: The-Alchemist --- ring-core/test/ring/util/test/response.clj | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ring-core/test/ring/util/test/response.clj b/ring-core/test/ring/util/test/response.clj index de699454..3b003fc9 100644 --- a/ring-core/test/ring/util/test/response.clj +++ b/ring-core/test/ring/util/test/response.clj @@ -147,9 +147,12 @@ (let [body (:body (resource-response "ring/util/response.clj"))] (is (instance? File body)) (is (.startsWith (slurp body) "(ns ring.util.response"))) - (let [body (:body (resource-response "clojure/java/io.clj"))] + (let [resource-path + (str "META-INF/maven/org.ring-clojure/" + "ring-core-protocols/pom.properties") + body (:body (resource-response resource-path))] (is (instance? InputStream body)) - (is (.contains (slurp body) "clojure.java.io")))) + (is (.contains (slurp body) "artifactId=ring-core-protocols"))) (testing "resource is a directory" (is (nil? (resource-response "/ring/assets"))))