On Jan 15, 2012, at 5:18 PM, Matt Stump wrote: > Ideally I would like to do something like the following: for production and > development, if an environment variable is set connect to the database server > at the specified URL, if not then fall back to localhost. For test start up > an embedded server, and connect. After the test is done, rollback the global > var to the previous value and resume connecting to the server on localhost or > at the location specified by the environment variable.
I created Midje's "background" wrappers for a similar purpose: https://github.com/marick/Midje/wiki/Setup%2C-Teardown%2C-and-State Note that you can mix and match Midje tests and clojure.test tests, even wrap Midje tests inside deftest, so using `background` doesn't commit you to a wholesale rewrite of existing tests. ----- Brian Marick, Artisanal Labrador Now working at http://path11.com Contract programming in Ruby and Clojure Occasional consulting on Agile -- 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