<?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: Two Shoulda best practices</title>
	<atom:link href="http://programblings.com/2008/10/31/two-shoulda-best-practices/feed/" rel="self" type="application/rss+xml" />
	<link>http://programblings.com/2008/10/31/two-shoulda-best-practices/</link>
	<description>Rambling about programming and life as a programmer - by Mathieu Martin</description>
	<lastBuildDate>Thu, 26 Feb 2009 13:28:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: RSpec: Shoulda Looked At It Sooner &#171; A little story</title>
		<link>http://programblings.com/2008/10/31/two-shoulda-best-practices/comment-page-1/#comment-1174</link>
		<dc:creator>RSpec: Shoulda Looked At It Sooner &#171; A little story</dc:creator>
		<pubDate>Thu, 26 Feb 2009 13:28:39 +0000</pubDate>
		<guid isPermaLink="false">http://programblings.com/?p=117#comment-1174</guid>
		<description>[...] service call, his matchy library for the fancy session[:user_id].should assertion, and a macro I stole (logged_in_as) to easily setup authentication for controller tests. Nothing fancy, but I just like [...]</description>
		<content:encoded><![CDATA[<p>[...] service call, his matchy library for the fancy session[:user_id].should assertion, and a macro I stole (logged_in_as) to easily setup authentication for controller tests. Nothing fancy, but I just like [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mathieu Martin</title>
		<link>http://programblings.com/2008/10/31/two-shoulda-best-practices/comment-page-1/#comment-1171</link>
		<dc:creator>Mathieu Martin</dc:creator>
		<pubDate>Wed, 25 Feb 2009 22:07:01 +0000</pubDate>
		<guid isPermaLink="false">http://programblings.com/?p=117#comment-1171</guid>
		<description>I fixed the comment :-)</description>
		<content:encoded><![CDATA[<p>I fixed the comment :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Breen (hardbap)</title>
		<link>http://programblings.com/2008/10/31/two-shoulda-best-practices/comment-page-1/#comment-1167</link>
		<dc:creator>Mike Breen (hardbap)</dc:creator>
		<pubDate>Wed, 25 Feb 2009 15:49:48 +0000</pubDate>
		<guid isPermaLink="false">http://programblings.com/?p=117#comment-1167</guid>
		<description>hmm...the formatting got messed up but you can still see what I&#039;m doing.</description>
		<content:encoded><![CDATA[<p>hmm&#8230;the formatting got messed up but you can still see what I&#8217;m doing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Breen (hardbap)</title>
		<link>http://programblings.com/2008/10/31/two-shoulda-best-practices/comment-page-1/#comment-1166</link>
		<dc:creator>Mike Breen (hardbap)</dc:creator>
		<pubDate>Wed, 25 Feb 2009 15:48:31 +0000</pubDate>
		<guid isPermaLink="false">http://programblings.com/?p=117#comment-1166</guid>
		<description>Great post, thanks.

After poking around the Shoulda code I ended up writing my macros like this:

&lt;pre&gt;&lt;code&gt;# Sets the current person in the session from the person fixtures.
def logged_in_as(person, &amp;block)
  context &quot;logged in as #{person}&quot; do
    setup do
      @request.session[:person] = people(person).id
    end

    merge_block(&amp;block)
  end
end&lt;/code&gt;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Great post, thanks.</p>
<p>After poking around the Shoulda code I ended up writing my macros like this:</p>
<pre><code># Sets the current person in the session from the person fixtures.
def logged_in_as(person, &amp;block)
  context "logged in as #{person}" do
    setup do
      @request.session[:person] = people(person).id
    end

    merge_block(&amp;block)
  end
end</code></pre>
]]></content:encoded>
	</item>
</channel>
</rss>
