Re: Problems Running tests with fixtures

2010-10-03 Thread Timothy Washington
Iiinteresting. It turns out that I wasn't calling (x) in the :once code. It looks like that prevents :each test from running. (ns utest) (use 'clojure.test) (defn f [x] (println "f before") (x) (println "f after")) (use-fixtures :each f) (defn g [x] (println "g1") *(x)* (println "g2")) (use-fix

Re: Problems Running tests with fixtures

2010-10-01 Thread Timothy Washington
Hmmm, I'm using clojure 1.2. I'll try out 1.3 when I get home. Thanks Tim On Thu, Sep 30, 2010 at 10:09 PM, Sean Corfield wrote: > On Thu, Sep 30, 2010 at 2:44 PM, Timothy Washington > wrote: > > Just in case anyone comes across this, I did get around it. In fig. 2 I > was > > trying to run (u

Re: Problems Running tests with fixtures

2010-09-30 Thread Sean Corfield
On Thu, Sep 30, 2010 at 2:44 PM, Timothy Washington wrote: > Just in case anyone comes across this, I did get around it. In fig. 2 I was > trying to run (use-fixtures) twice. One with a :once, and one with :each. I just tried that and it worked fine for me: (ns utest) (use 'clojure.test) (defn f

Re: Problems Running tests with fixtures

2010-09-30 Thread Timothy Washington
Just in case anyone comes across this, I did get around it. In fig. 2 I was trying to run (use-fixtures) twice. One with a :once, and one with :each. I just commented out the :once call and executed manually. *(use-fixtures :once login-test/test-fixture-shell )* *(use-fixtures :each login-test/te

Re: Problems Running tests with fixtures

2010-09-28 Thread Timothy Washington
Oh that's my mistake in the example code. My actual code does have an (is ) function. The example code should look like: (deftest test-code [] *(is (= 5 5)) * ) Tim On Tue, Sep 28, 2010 at 12:29 PM, Kevin Downey wrote: > your test has no (is ...) > > On Mon, Sep 27, 2010 at 5:16 PM, Timot

Re: Problems Running tests with fixtures

2010-09-28 Thread Kevin Downey
your test has no (is ...) On Mon, Sep 27, 2010 at 5:16 PM, Timothy Washington wrote: > I suppose I've been looking at this code for too long, so I need a 2nd pair > of eyes on it. I'm not getting some 'test.is' code to run. I'm trying to run > the tests as in fig. 1. Suppose the tests are defined

Problems Running tests with fixtures

2010-09-27 Thread Timothy Washington
I suppose I've been looking at this code for too long, so I need a 2nd pair of eyes on it. I'm not getting some 'test.is' code to run. I'm trying to run the tests as in fig. 1. Suppose the tests are defined in a file called utests.clj (fig. 2). (use 'clojure.test) (require 'utests) (run-tests 'ut