<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/tags/Stub</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Thu, 23 May 2013 01:58:38 GMT</pubDate>
<item>
<title>(Clojure) Clojure test stubbing - ef</title>
<link>http://snipplr.com/view/62692/clojure-test-stubbing/</link>
<description><![CDATA[ <p>Macro allowing for substitution of functions with predefined values.
Taken from "Clojure in action" page 180
Example:
(defn calc-x [x1 x2]
  (* x1 x2))
(defn calc-y [y1 y2]
   (/ y2 y1))
(defn some-client []
  (println (calc-x 2 3) (calc-y 3 4)))
(stubbing [calc-x 1
            calc-y 2
   (some-client))

prints: "1 2" instead of  "6 4/3"</p> ]]></description>
<pubDate>Sat, 21 Jan 2012 05:57:32 GMT</pubDate>
<guid>http://snipplr.com/view/62692/clojure-test-stubbing/</guid>
</item>
</channel>
</rss>