<?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 for terrbear.org</title>
	<atom:link href="http://terrbear.org/?feed=comments-rss2" rel="self" type="application/rss+xml" />
	<link>http://terrbear.org</link>
	<description>ruby! rails! kids! oh my! ... and other fun from terry heath</description>
	<lastBuildDate>Tue, 31 Aug 2010 17:32:13 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>Comment on Quick tip: say (OSX) by terry</title>
		<link>http://terrbear.org/?p=307&#038;cpage=1#comment-1140</link>
		<dc:creator>terry</dc:creator>
		<pubDate>Tue, 31 Aug 2010 17:32:13 +0000</pubDate>
		<guid isPermaLink="false">http://terrbear.org/?p=307#comment-1140</guid>
		<description>@Keith
That&#039;s genius!</description>
		<content:encoded><![CDATA[<p>@Keith<br />
That&#8217;s genius!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Quick tip: say (OSX) by Keith Rarick</title>
		<link>http://terrbear.org/?p=307&#038;cpage=1#comment-1139</link>
		<dc:creator>Keith Rarick</dc:creator>
		<pubDate>Tue, 31 Aug 2010 17:01:13 +0000</pubDate>
		<guid isPermaLink="false">http://terrbear.org/?p=307#comment-1139</guid>
		<description>Or even, in case you leave your computer:

your_command ; curl -d phone=9995551234 http://lostmephone.heroku.com/call</description>
		<content:encoded><![CDATA[<p>Or even, in case you leave your computer:</p>
<p>your_command ; curl -d phone=9995551234 <a href="http://lostmephone.heroku.com/call" rel="nofollow">http://lostmephone.heroku.com/call</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Months of effort by stinkyskunk</title>
		<link>http://terrbear.org/?p=303&#038;cpage=1#comment-1120</link>
		<dc:creator>stinkyskunk</dc:creator>
		<pubDate>Wed, 25 Aug 2010 19:05:49 +0000</pubDate>
		<guid isPermaLink="false">http://terrbear.org/?p=303#comment-1120</guid>
		<description>you need lysol and antibiotics.  just sayin.</description>
		<content:encoded><![CDATA[<p>you need lysol and antibiotics.  just sayin.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Quick Tips by terry</title>
		<link>http://terrbear.org/?p=288&#038;cpage=1#comment-1068</link>
		<dc:creator>terry</dc:creator>
		<pubDate>Thu, 22 Apr 2010 13:58:06 +0000</pubDate>
		<guid isPermaLink="false">http://terrbear.org/?p=288#comment-1068</guid>
		<description>So I put a lot of debug in it, but here&#039;s what I had leftover:

http://gist.github.com/375257

I had that run before the ParamsParser</description>
		<content:encoded><![CDATA[<p>So I put a lot of debug in it, but here&#8217;s what I had leftover:</p>
<p><a href="http://gist.github.com/375257" rel="nofollow">http://gist.github.com/375257</a></p>
<p>I had that run before the ParamsParser</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Quick Tips by Eric</title>
		<link>http://terrbear.org/?p=288&#038;cpage=1#comment-1066</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Thu, 22 Apr 2010 00:40:36 +0000</pubDate>
		<guid isPermaLink="false">http://terrbear.org/?p=288#comment-1066</guid>
		<description>Re: &quot;I wrote some Rack middleware to intercept the parameters...&quot;

I&#039;ve been looking for something like this, any chance you could you post it as a gist or something?  Thx.</description>
		<content:encoded><![CDATA[<p>Re: &#8220;I wrote some Rack middleware to intercept the parameters&#8230;&#8221;</p>
<p>I&#8217;ve been looking for something like this, any chance you could you post it as a gist or something?  Thx.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Pivotal Pulse and Integrity by Diego Carrion</title>
		<link>http://terrbear.org/?p=280&#038;cpage=1#comment-1039</link>
		<dc:creator>Diego Carrion</dc:creator>
		<pubDate>Thu, 01 Apr 2010 15:34:11 +0000</pubDate>
		<guid isPermaLink="false">http://terrbear.org/?p=280#comment-1039</guid>
		<description>Nice! Will implemented that in Signal :)</description>
		<content:encoded><![CDATA[<p>Nice! Will implemented that in Signal <img src='http://terrbear.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Machinist + RSpec matcher by terry</title>
		<link>http://terrbear.org/?p=265&#038;cpage=1#comment-1014</link>
		<dc:creator>terry</dc:creator>
		<pubDate>Mon, 22 Mar 2010 15:21:16 +0000</pubDate>
		<guid isPermaLink="false">http://terrbear.org/?p=265#comment-1014</guid>
		<description>@Brian
No. The test is checking that the blueprints for the model work with validations and callbacks.</description>
		<content:encoded><![CDATA[<p>@Brian<br />
No. The test is checking that the blueprints for the model work with validations and callbacks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Machinist + RSpec matcher by Brian Cardarella</title>
		<link>http://terrbear.org/?p=265&#038;cpage=1#comment-1012</link>
		<dc:creator>Brian Cardarella</dc:creator>
		<pubDate>Mon, 22 Mar 2010 14:57:09 +0000</pubDate>
		<guid isPermaLink="false">http://terrbear.org/?p=265#comment-1012</guid>
		<description>Would it make more sense to test if the Machinist Library is included in ActiveRecord ?</description>
		<content:encoded><![CDATA[<p>Would it make more sense to test if the Machinist Library is included in ActiveRecord ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Machinist + RSpec matcher by terry</title>
		<link>http://terrbear.org/?p=265&#038;cpage=1#comment-1009</link>
		<dc:creator>terry</dc:creator>
		<pubDate>Sun, 21 Mar 2010 23:54:27 +0000</pubDate>
		<guid isPermaLink="false">http://terrbear.org/?p=265#comment-1009</guid>
		<description>@Stephen 
3 lines of code, and having to type a description to keep things expressive. I think specs should be expressive, and not &quot;it { model.make_unsaved.should be_valid }*&quot; 

So, yes, copying this once to my new projects and keeping everything 1 line of code from there on out is worth it (Callbacks can definitely have problems, and if those show up in your blueprints, your test hasn&#039;t revealed that -- the lambda and should_not raise_error gets to be tedious enough and hard enough to decipher that it&#039;s worth abstracting, I think).
</description>
		<content:encoded><![CDATA[<p>@Stephen<br />
3 lines of code, and having to type a description to keep things expressive. I think specs should be expressive, and not &#8220;it { model.make_unsaved.should be_valid }*&#8221; </p>
<p>So, yes, copying this once to my new projects and keeping everything 1 line of code from there on out is worth it (Callbacks can definitely have problems, and if those show up in your blueprints, your test hasn&#8217;t revealed that &#8212; the lambda and should_not raise_error gets to be tedious enough and hard enough to decipher that it&#8217;s worth abstracting, I think).</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Machinist + RSpec matcher by Stephen Eley</title>
		<link>http://terrbear.org/?p=265&#038;cpage=1#comment-1007</link>
		<dc:creator>Stephen Eley</dc:creator>
		<pubDate>Sun, 21 Mar 2010 23:21:01 +0000</pubDate>
		<guid isPermaLink="false">http://terrbear.org/?p=265#comment-1007</guid>
		<description>Ahh, okay, I get it now. What you&#039;re saying is that you&#039;re not testing Machinist, you&#039;re testing your assumptions about the model (which are reflected in the blueprint.) That makes sense, and I usually do it too for anything non-trivial. 

I still think you might have made it a bit too complicated though. I usually assert that expectation with either:

    Model.make_unsaved.should be_valid

or:

    Model.make.should be_a(Model)

Most often the former, as the way I usually test validation rules is to set up before(:each) block with something like:

    before(:each) do
      @this = Model.make_unsaved
    end

...and then torture the attributes of @this in various ways, verifying each time that the model is no longer valid.  An initial &quot;@this.should be_valid&quot; is then sort of necessary to isolate the variables. 

Back to the original issue, though: even if the test purpose is sound, making a matcher for it still seems like unnecessary complexity. Your initial example was one line of code.  You wrote 20 lines of code, which will presumably be included in a separate file in every future project, so that you could simplify that one line of code into...one line of code. 

Granted, the new line of code is prettier than the old. If that&#039;s enough of a win for you to make it worth it, rock on. &gt;8-&gt; (Sometimes it is for me too.)</description>
		<content:encoded><![CDATA[<p>Ahh, okay, I get it now. What you&#8217;re saying is that you&#8217;re not testing Machinist, you&#8217;re testing your assumptions about the model (which are reflected in the blueprint.) That makes sense, and I usually do it too for anything non-trivial. </p>
<p>I still think you might have made it a bit too complicated though. I usually assert that expectation with either:</p>
<p>    Model.make_unsaved.should be_valid</p>
<p>or:</p>
<p>    Model.make.should be_a(Model)</p>
<p>Most often the former, as the way I usually test validation rules is to set up before(:each) block with something like:</p>
<p>    before(:each) do<br />
      @this = Model.make_unsaved<br />
    end</p>
<p>&#8230;and then torture the attributes of @this in various ways, verifying each time that the model is no longer valid.  An initial &#8220;@this.should be_valid&#8221; is then sort of necessary to isolate the variables. </p>
<p>Back to the original issue, though: even if the test purpose is sound, making a matcher for it still seems like unnecessary complexity. Your initial example was one line of code.  You wrote 20 lines of code, which will presumably be included in a separate file in every future project, so that you could simplify that one line of code into&#8230;one line of code. </p>
<p>Granted, the new line of code is prettier than the old. If that&#8217;s enough of a win for you to make it worth it, rock on. &gt;8-&gt; (Sometimes it is for me too.)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->