diff options
author | Stuart Sierra <mail@stuartsierra.com> | 2009-01-16 15:53:43 +0000 |
---|---|---|
committer | Stuart Sierra <mail@stuartsierra.com> | 2009-01-16 15:53:43 +0000 |
commit | ce3ee7adf337f896b4a94dc853f7279e807de342 (patch) | |
tree | 45f8081ff54ec84af5de6b62763c35f2b0e4deda /src/clojure/contrib/test_is | |
parent | 25b6bd086d1a4a9ec53bbf8a6db3c74cb6a01601 (diff) |
test_is/tests.clj: added test using anonymous #() functions
Diffstat (limited to 'src/clojure/contrib/test_is')
-rw-r--r-- | src/clojure/contrib/test_is/tests.clj | 4 |
1 files changed, 4 insertions, 0 deletions
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 |