Stuart Halloway wrote: > concerns: > (1) Would like to see the file after a failed test. > (2) [...] I would be much more > comfortable not having to rely on code to write the file first. > Doesn't feel like a unit test. > > But I am much more interested in having a shared approach that all > contrib users adhere to than in getting my way. :-)
Why not: (binding [*tmp-properties-file* (File/createTempFile "temp" ".properties")] (.deleteOnExit *tmp-properties-file*) (spit *tmp-properties-file* "contents of the test file") ...) ...wrapped in whatever macro if need be. Re: your (1): this way, you'll see it; it will be deleted when the jvm shuts down. Re: your (2): I personally wouldn't mind if we rely on contrib/spit as long as it's tested itself. :) --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---