From ce3ee7adf337f896b4a94dc853f7279e807de342 Mon Sep 17 00:00:00 2001 From: Stuart Sierra Date: Fri, 16 Jan 2009 15:53:43 +0000 Subject: test_is/tests.clj: added test using anonymous #() functions --- src/clojure/contrib/test_is/tests.clj | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/clojure/contrib') diff --git a/src/clojure/contrib/test_is/tests.clj b/src/clojure/contrib/test_is/tests.clj index f846b699..1b80ec3c 100644 --- a/src/clojure/contrib/test_is/tests.clj +++ b/src/clojure/contrib/test_is/tests.clj @@ -51,6 +51,10 @@ (is (.startsWith "abc" "a") "Should pass") (is (.startsWith "abc" "d") "Should fail")) +(deftest can-test-anonymous-fn + (is (#(.startsWith % "a") "abc") "Should pass") + (is (#(.startsWith % "d") "abc") "Should fail")) + ;; Here, we create an alternate version of test-is/report, that ;; compares the event with the message. The alternate calls the -- cgit v1.2.3-70-g09d2