I'm trying to unit-test a mutli-function's methods without resorting to a separate test file. I can do this:
(defn foo ([x] (+ x 2)) {:test (fn [] (= (foo 3) 4))}) ...but how do I do something like this? ; Does not work (defmethod foo :mapping ([x] (assoc x :a 5)) {:test (fn [] (= (foo {:a 3 :b 2}) {:a 5 :b 2}))}) I can't find a way to attach metadata to methods. I can't find a function that creates a standalone method that I can define a variable with. Is it currently possible to somehow do this another way? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---