Thanks to everyone who answered. The custom macro seems to be the way
to go for a local method. I'm no good at macros, though, so I suppose
I have to confront them and figure them out now. :)

On Nov 19, 5:20 am, Stuart Halloway <[EMAIL PROTECTED]> wrote:
> You could write a with-method macro that adds a method to a  
> multifunction, and then removes it at the end of the test. It would be  
> dynamically scoped, but that should be good enough for test setup/
> teardown.
>
> Stuart
>
>
>
> > I'm trying to unit-test a library with which a user can define methods
> > on the library's multi-function to change its behavior. So I need to
> > be able to define lexically-scoped methods in each test. Is it
> > possible to use let to create a lexically-scoped method?
>
> > The problems I'm encountering are that, unlike for functions, there
> > doesn't seem to be a special-form for creating methods, and that even
> > if it could be defined it'd go in the current namespace instead of the
> > library's namespace. But does anyone know how I can test this anyway?
>
> > Thanks in advance!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to