Skip to content

Instantly share code, notes, and snippets.

@jaycfields
Last active December 15, 2015 15:28
Show Gist options
  • Save jaycfields/5281648 to your computer and use it in GitHub Desktop.
Save jaycfields/5281648 to your computer and use it in GitHub Desktop.
(defn in-context
"rebind a var, expecations are run in the defined context"
{:expectations-options :in-context}
[work]
(with-redefs [some-src/a-fn-to-be-rebound (constantly :a-rebound-val)]
(work)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment