Skip to content

Instantly share code, notes, and snippets.

@zaphar
Created March 24, 2010 01:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zaphar/341873 to your computer and use it in GitHub Desktop.
Save zaphar/341873 to your computer and use it in GitHub Desktop.
(defmacro defdstest
"Set up an appengine datastore test using local in memory datastore."
[nm & body]
`(clojure.test/deftest ~nm
(let [helper-conf# (LocalDatastoreServiceTestConfig.)
helper# (LocalServiceTestHelper. helper-conf#)]
(.setUp helper#)
(try
~@body
(finally (.tearDown helper#)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment