<?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/"
	xmlns:series="http://unfoldingneurons.com/"
		>
<channel>
	<title>Comments on: Testing declarative code</title>
	<atom:link href="http://therealadam.com/archive/2009/10/27/testing-declarative-code/feed/" rel="self" type="application/rss+xml" />
	<link>http://therealadam.com/archive/2009/10/27/testing-declarative-code/</link>
	<description>Polymath practicing programming, probably procrastinating</description>
	<lastBuildDate>Fri, 05 Mar 2010 07:52:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ed Spencer</title>
		<link>http://therealadam.com/archive/2009/10/27/testing-declarative-code/comment-page-1/#comment-901</link>
		<dc:creator>Ed Spencer</dc:creator>
		<pubDate>Fri, 30 Oct 2009 17:04:59 +0000</pubDate>
		<guid isPermaLink="false">http://therealadam.com/?p=846#comment-901</guid>
		<description>I&#039;ve had this exact same problem, but I don&#039;t know the answer :(

I wrote a bunch of rspec macros to reduce my previously multi-line specs which test various model declarations down to a single line, but then found myself in the same situation you describe...

My thinking at the moment is that duplicating a model declaration with a spec declaration is pointless, and not very dry.  Any getter/setter tests should be abstracted up to the DSL library level and the model declarations left to speak for themselves.  I could be wrong though :)</description>
		<content:encoded><![CDATA[<p>I&#8217;ve had this exact same problem, but I don&#8217;t know the answer&nbsp;:(</p>
<p>I wrote a bunch of rspec macros to reduce my previously multi-line specs which test various model declarations down to a single line, but then found myself in the same situation you&nbsp;describe&#8230;</p>
<p>My thinking at the moment is that duplicating a model declaration with a spec declaration is pointless, and not very dry.  Any getter/setter tests should be abstracted up to the <span class="caps"><span class="caps">DSL</span> </span>library level and the model declarations left to speak for themselves.  I could be wrong though&nbsp;:)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam Keys</title>
		<link>http://therealadam.com/archive/2009/10/27/testing-declarative-code/comment-page-1/#comment-900</link>
		<dc:creator>Adam Keys</dc:creator>
		<pubDate>Wed, 28 Oct 2009 15:41:28 +0000</pubDate>
		<guid isPermaLink="false">http://therealadam.com/?p=846#comment-900</guid>
		<description>You make a good point about testing accessors. However, I like the _idea_ of testing the contract of a class, and accessors are certainly part of the contract. But liking the idea does not mean I&#039;m going to stick with it in practice ;)</description>
		<content:encoded><![CDATA[<p>You make a good point about testing accessors. However, I like the <em>idea</em> of testing the contract of a class, and accessors are certainly part of the contract. But liking the idea does not mean I&#8217;m going to stick with it in practice&nbsp;;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jamie Macey</title>
		<link>http://therealadam.com/archive/2009/10/27/testing-declarative-code/comment-page-1/#comment-899</link>
		<dc:creator>Jamie Macey</dc:creator>
		<pubDate>Wed, 28 Oct 2009 12:36:37 +0000</pubDate>
		<guid isPermaLink="false">http://therealadam.com/?p=846#comment-899</guid>
		<description>I&#039;d say leave that test out, and also leave the key declarations out until they&#039;re storing data you need for some behaviour.  I presume the &#039;key&#039; statements both set up (a) an accessor on the attribute, and (b) persistent storage of the values - testing plain readers/writers doesn&#039;t gain much IMO, and you&#039;ll be testing storage in general at higher level tests.</description>
		<content:encoded><![CDATA[<p>I&#8217;d say leave that test out, and also leave the key declarations out until they&#8217;re storing data you need for some behaviour.  I presume the &#8216;key&#8217; statements both set up (a) an accessor on the attribute, and (b) persistent storage of the values - testing plain readers/writers doesn&#8217;t gain much <span class="caps"><span class="caps">IMO</span>, </span>and you&#8217;ll be testing storage in general at higher level&nbsp;tests.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
