<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: The trouble with mocks (or design versus acceptance)</title>
	<atom:link href="http://www.3hv.co.uk/blog/2009/03/12/the-trouble-with-mocks-or-design-versus-acceptance/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.3hv.co.uk/blog/2009/03/12/the-trouble-with-mocks-or-design-versus-acceptance/</link>
	<description>precision engineering for your website</description>
	<lastBuildDate>Sat, 14 Jan 2012 00:39:13 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Markus</title>
		<link>http://www.3hv.co.uk/blog/2009/03/12/the-trouble-with-mocks-or-design-versus-acceptance/comment-page-1/#comment-1261</link>
		<dc:creator>Markus</dc:creator>
		<pubDate>Sat, 21 Mar 2009 00:16:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.3hv.co.uk/blog/?p=426#comment-1261</guid>
		<description>I&#039;m switching from BDD back to TDD too, like Luke.

About mocks, I used them for controllers in the past, like many BDD developers, but I don&#039;t use them anymore. I think mocks should not be used to mock your own cod, they should be used to mock external resources or libraries over which you have little or no control. Mocking in controllers might be great for prototyping your application, but as your app grows you should remove those mocks and add real objects, since these objects are part of the application structure and they&#039;re not external... and you are testing them too when you do this. In fact, these types of &quot;temporary&quot; mocks should be called fakes instead, since they are there to simulate a untested piece of your own code, which you have to refactorize further.

These ideas aren&#039;t mine though, all these ideas were wrote down by Kent Beck in his &quot;Test Driven Development, By example&quot;, he talks exactly about that, fakes to quickly get &quot;green bars&quot; and begin to refactor, and mocks to simulate external libraries or resources.</description>
		<content:encoded><![CDATA[<p>I&#8217;m switching from BDD back to TDD too, like Luke.</p>
<p>About mocks, I used them for controllers in the past, like many BDD developers, but I don&#8217;t use them anymore. I think mocks should not be used to mock your own cod, they should be used to mock external resources or libraries over which you have little or no control. Mocking in controllers might be great for prototyping your application, but as your app grows you should remove those mocks and add real objects, since these objects are part of the application structure and they&#8217;re not external&#8230; and you are testing them too when you do this. In fact, these types of &#8220;temporary&#8221; mocks should be called fakes instead, since they are there to simulate a untested piece of your own code, which you have to refactorize further.</p>
<p>These ideas aren&#8217;t mine though, all these ideas were wrote down by Kent Beck in his &#8220;Test Driven Development, By example&#8221;, he talks exactly about that, fakes to quickly get &#8220;green bars&#8221; and begin to refactor, and mocks to simulate external libraries or resources.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Double Shot #413 &#171; A Fresh Cup</title>
		<link>http://www.3hv.co.uk/blog/2009/03/12/the-trouble-with-mocks-or-design-versus-acceptance/comment-page-1/#comment-1259</link>
		<dc:creator>Double Shot #413 &#171; A Fresh Cup</dc:creator>
		<pubDate>Fri, 20 Mar 2009 11:40:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.3hv.co.uk/blog/?p=426#comment-1259</guid>
		<description>[...] The trouble with mocks (or design versus acceptance) - The debate about mocks in testing will never end. [...]</description>
		<content:encoded><![CDATA[<p>[...] The trouble with mocks (or design versus acceptance) &#8211; The debate about mocks in testing will never end. [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.190 seconds -->

