Re: seeking advice for reducing boilerplate

2011-09-30 Thread Andrew
Thanks (both) for the advice! -- 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 t

Re: seeking advice for reducing boilerplate

2011-09-28 Thread Eric Lavigne
> While trying out clj-webdriver (for testing web pages), I got the impulse to > reduce some of my boilerplate. I'd like your advice on best practices. I would start with the main test macro, web-test. I would replace your local variable b with a dynamically bound var *browser* that web-test is re

Re: seeking advice for reducing boilerplate

2011-09-28 Thread Kevin Downey
the browser bit should really use with-open (with-open [browser (create-browser :firefox)] On Wed, Sep 28, 2011 at 4:32 PM, Andrew wrote: > While trying out clj-webdriver (for testing web pages), I got the impulse to > reduce some of my boilerplate. I'd like your advice on best practices. > Her

seeking advice for reducing boilerplate

2011-09-28 Thread Andrew
While trying out clj-webdriver (for testing web pages), I got the impulse to reduce some of my boilerplate. I'd like your advice on best practices. Here's the original code. (deftest test-login (let [b (start :firefox "https://github.com";)] (try (implicit-wait b 6) (-> b (