<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:ent="http://www.purl.org/NET/ENT/1.0/" version="2.0">
  <channel>
    <title>Curiouser and Curiouser! on mock-objects</title>
    <link>http://matt.blogs.it/</link>
    <description>RSS feed for topic mock-objects</description>
    <copyright>Copyright 2008 Matt Mower. Some rights reserved.</copyright>
    <generator>Squib/0.5.0.382</generator>
    <managingEditor>self@mattmower.com</managingEditor>
    <webMaster>self@mattmower.com</webMaster>
    <language>en-gb</language>
    <item>
      <title>My truth about testing</title>
      <link>http://matt.blogs.it/entries/00002905.html</link>
      <pubDate>Mon, 01 Sep 2008 16:13:19 +0100</pubDate>
      <description>&lt;p&gt;I'm reading Rick Bradley's post on &lt;a href="http://b.logi.cx/2007/11/26/object-daddy"&gt;Object Daddy&lt;/a&gt;. Testing on &lt;a href="http://reeplay.it/"&gt;reeplay.it&lt;/a&gt; has gone through phases. First there was a little &lt;code&gt;Test::Unit&lt;/code&gt; then there was not so much of that. Then &lt;code&gt;RSpec&lt;/code&gt; reared its head. We got about 80% through converting the tests across which was useful because a lot of the old tests were rotten and the new specs were better. In the process we went from fixtures, to rathole fixtures, to mocks, to mocks + rathole fixtures + desperation.&lt;/p&gt;

&lt;p&gt;In many cases when I get frustrated with the setup cost for mocks I think it is because my controller has too many responsibilities. Rethinking what the controller is doing and pushing responsibilities down into the models often makes things easier. Yet mocks still, often, seem to have quite a setup cost.&lt;/p&gt;

&lt;p&gt;Fixtures hold out the promise (if never the actuality) of a sensible data set. Mocks hold out (and to a great extent deliver) the promise of avoiding the database and hiding the details not relevant to a test. I'm hoping ObjectDaddy might bridge the two worlds.&lt;/p&gt;</description>
      <guid isPermaLink="true">http://matt.blogs.it/entries/00002905.html</guid>
      <ent:cloud ent:href="http://matt.blogs.it/topics/">
      </ent:cloud>
    </item>
  </channel>
</rss>
