Check out 'with-redefs' in clojure.core. -BG
Sent from phone. Please excuse brevity. On 16 Nov 2012 08:02, "faenvie" <fanny.aen...@gmx.de> wrote: > hi clojure-users, > > for testing an app that uses quil, i want to mock out some > function-calls to the quil-library ... when i do it like this: > > (ns myapp > (:use clojure.test) > (:require [quil.core :as q])) > > (deftest > (binding [q/height (fn [] 400)] > (is 400 (q/height)))) > > i get an Exception that says: > > actual: java.lang.IllegalStateException: Can't dynamically bind > non-dynamic var: quil.core/height > > Any hints, how this an be solved or circumvented ? > > thanks & have a successful day > > -- > 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 > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en -- 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 Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en