Hmm, these are all good points. My source file just returns the sequence
(as in *src.clj*). I have a midje test file (*test.clj*) that just asserts
that it exists.
*src.clj *


(ns my-ns ... )

(defn load-config []

  (let [config (load-file "etc/config.clj")
        dname (-> config :data :test)]
    (csv/parse-csv (io/reader dname))
  )
)



*test.clj*


(fact "load config training file; ensure first tickis as expected"
      (config/load-config) => truthy
)



Sean and David, you are very correct in that it was midje that was doing
the consuming. If, on the repl, I lazily pull from the seq, then I get the
desired effect.

user> (def thing (config/load-config))

user> (*first* thing)
["Time" "Ask" "Bid" "AskVolume" "BidVolume"]

user> (*second* thing)
["01.05.2012 20:00:00.676" "1.32390" "1.32379" "3000000.00" "2250000.00"]



So the question seems to be which test functions let me deal with lazy
sequences in this way. For now, I'm using this:

(fact "load config training file; ensure first tickis as expected"
      (-> (config/load-config) nil? not) => true
)




Cheers all

Tim Washington
Interruptsoftware.ca
416.843.9060



On Sun, Jul 8, 2012 at 7:50 PM, Dustin Getz <dustin.g...@gmail.com> wrote:

> what are you doing with the return value of csv/parse-csv?
>
>  --
> 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

Reply via email to