Skip to content

Instantly share code, notes, and snippets.

@jaycfields
Created October 31, 2012 19:16
Show Gist options
  • Save jaycfields/3989207 to your computer and use it in GitHub Desktop.
Save jaycfields/3989207 to your computer and use it in GitHub Desktop.
frozen in time
(ns blog-expectations
(:use expectations)
(:import [org.joda.time DateTime]))
(defn add-timestamp [m]
(assoc m :time (DateTime.)))
(expect {:time (DateTime. 1)}
(freeze-time (DateTime. 1)
(add-timestamp {})))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment