<?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"
	>
<channel>
	<title>Comments on: Writing Macros in RSpec</title>
	<atom:link href="http://www.benmabey.com/2008/06/08/writing-macros-in-rspec/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.benmabey.com/2008/06/08/writing-macros-in-rspec/</link>
	<description>[ software_engineering, ruby, rants, randomness ]</description>
	<pubDate>Wed, 19 Nov 2008 11:11:28 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: Ben Mabey</title>
		<link>http://www.benmabey.com/2008/06/08/writing-macros-in-rspec/#comment-923</link>
		<dc:creator>Ben Mabey</dc:creator>
		<pubDate>Wed, 09 Jul 2008 16:41:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.benmabey.com/?p=20#comment-923</guid>
		<description>Thanks Michael!  It is always reinforcing to get positive feedback. :)</description>
		<content:encoded><![CDATA[<p>Thanks Michael!  It is always reinforcing to get positive feedback. <img src='http://www.benmabey.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Niessner</title>
		<link>http://www.benmabey.com/2008/06/08/writing-macros-in-rspec/#comment-922</link>
		<dc:creator>Michael Niessner</dc:creator>
		<pubDate>Wed, 09 Jul 2008 16:39:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.benmabey.com/?p=20#comment-922</guid>
		<description>Another great post!</description>
		<content:encoded><![CDATA[<p>Another great post!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew WC Brown</title>
		<link>http://www.benmabey.com/2008/06/08/writing-macros-in-rspec/#comment-914</link>
		<dc:creator>Andrew WC Brown</dc:creator>
		<pubDate>Wed, 02 Jul 2008 13:23:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.benmabey.com/?p=20#comment-914</guid>
		<description>Wow this is really wicked Ben.

@Chelimsky

 I'd call it hand holding.</description>
		<content:encoded><![CDATA[<p>Wow this is really wicked Ben.</p>
<p>@Chelimsky</p>
<p> I&#8217;d call it hand holding.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben Mabey</title>
		<link>http://www.benmabey.com/2008/06/08/writing-macros-in-rspec/#comment-899</link>
		<dc:creator>Ben Mabey</dc:creator>
		<pubDate>Sun, 22 Jun 2008 20:21:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.benmabey.com/?p=20#comment-899</guid>
		<description>@maninred:
I just found a project on github with a lot of rspec macros... You might want to check it out:

http://github.com/rsl/skinny_spec/tree/master</description>
		<content:encoded><![CDATA[<p>@maninred:<br />
I just found a project on github with a lot of rspec macros&#8230; You might want to check it out:</p>
<p><a href="http://github.com/rsl/skinny_spec/tree/master" rel="nofollow">http://github.com/rsl/skinny_spec/tree/master</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: maninred</title>
		<link>http://www.benmabey.com/2008/06/08/writing-macros-in-rspec/#comment-898</link>
		<dc:creator>maninred</dc:creator>
		<pubDate>Sun, 22 Jun 2008 17:30:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.benmabey.com/?p=20#comment-898</guid>
		<description>If Rspec has test macros that will be very well,  when i see the shoulda i think like that. I had try to do this but the Rspec'context too complex. So i give out. -_-

I advise you create a project about this Rspec Macros.

Thank for the post!</description>
		<content:encoded><![CDATA[<p>If Rspec has test macros that will be very well,  when i see the shoulda i think like that. I had try to do this but the Rspec&#8217;context too complex. So i give out. -_-</p>
<p>I advise you create a project about this Rspec Macros.</p>
<p>Thank for the post!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SitePoint Blogs &#187; This week in Rails - 09/06 to 13/06</title>
		<link>http://www.benmabey.com/2008/06/08/writing-macros-in-rspec/#comment-851</link>
		<dc:creator>SitePoint Blogs &#187; This week in Rails - 09/06 to 13/06</dc:creator>
		<pubDate>Mon, 16 Jun 2008 14:24:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.benmabey.com/?p=20#comment-851</guid>
		<description>[...] Ben Mabey shows you how to use Macros in RSpec, using Shouda. Macros are as old as the hills, but can be really handy to organise many tasks simply: http://www.benmabey.com/2008/06/08/writing-macros-in-rspec/ [...]</description>
		<content:encoded><![CDATA[<p>[...] Ben Mabey shows you how to use Macros in RSpec, using Shouda. Macros are as old as the hills, but can be really handy to organise many tasks simply: <a href="http://www.benmabey.com/2008/06/08/writing-macros-in-rspec/" rel="nofollow">http://www.benmabey.com/2008/06/08/writing-macros-in-rspec/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rails kb &#187; Blog Archive &#187; [Howto] Test model relationships with RSpec</title>
		<link>http://www.benmabey.com/2008/06/08/writing-macros-in-rspec/#comment-737</link>
		<dc:creator>rails kb &#187; Blog Archive &#187; [Howto] Test model relationships with RSpec</dc:creator>
		<pubDate>Tue, 10 Jun 2008 10:12:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.benmabey.com/?p=20#comment-737</guid>
		<description>[...] on Ben Mabey&#8217;s idea testing model relationships becomes calling a simple method from a shared [...]</description>
		<content:encoded><![CDATA[<p>[...] on Ben Mabey&#8217;s idea testing model relationships becomes calling a simple method from a shared [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben Mabey</title>
		<link>http://www.benmabey.com/2008/06/08/writing-macros-in-rspec/#comment-735</link>
		<dc:creator>Ben Mabey</dc:creator>
		<pubDate>Tue, 10 Jun 2008 04:21:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.benmabey.com/?p=20#comment-735</guid>
		<description>@David:

Thanks for the corrections.  I have made a note of your comment in the post and corrected the spelling.  RSpec has already changed the way I spell behaviour, so spelling the the new word 'spec’ing' doesn't seem too hard. :)  English is so inconsistent.. *sigh*

@Yossef:

I agree that it seems a little clever.  Lets be honest though, dynamically creating specs is already dangerous territory. :)  IMO, instance_variable_get is the best option here if you want to have the flexibility.  However, I would understand the argument of sacrificing the flexibility and enforcing the naming to be consistent across implementation and specs.</description>
		<content:encoded><![CDATA[<p>@David:</p>
<p>Thanks for the corrections.  I have made a note of your comment in the post and corrected the spelling.  RSpec has already changed the way I spell behaviour, so spelling the the new word &#8217;spec’ing&#8217; doesn&#8217;t seem too hard. <img src='http://www.benmabey.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  English is so inconsistent.. *sigh*</p>
<p>@Yossef:</p>
<p>I agree that it seems a little clever.  Lets be honest though, dynamically creating specs is already dangerous territory. <img src='http://www.benmabey.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  IMO, instance_variable_get is the best option here if you want to have the flexibility.  However, I would understand the argument of sacrificing the flexibility and enforcing the naming to be consistent across implementation and specs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yossef</title>
		<link>http://www.benmabey.com/2008/06/08/writing-macros-in-rspec/#comment-734</link>
		<dc:creator>Yossef</dc:creator>
		<pubDate>Tue, 10 Jun 2008 03:38:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.benmabey.com/?p=20#comment-734</guid>
		<description>Oh, right. Class method, instance variable. It's obvious in hindsight.

Still fairly clever, though.</description>
		<content:encoded><![CDATA[<p>Oh, right. Class method, instance variable. It&#8217;s obvious in hindsight.</p>
<p>Still fairly clever, though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh Nichols</title>
		<link>http://www.benmabey.com/2008/06/08/writing-macros-in-rspec/#comment-733</link>
		<dc:creator>Josh Nichols</dc:creator>
		<pubDate>Tue, 10 Jun 2008 02:29:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.benmabey.com/?p=20#comment-733</guid>
		<description>Great writeup. I started out on RSpec, and then fell in love with shoulda. It's good to see that it's pretty straight-forward to do something similar in RSpec.

@Yossef:

it_should_assign is a class method, therefore, wouldn't have access to instance variables, like @users_photo.

The 'it' block inside 'it_should_assign' eventually defines an instance method, so it would have access to the instance variable. And that's exactly what it does with 'value = instance_variable_get(value)'.</description>
		<content:encoded><![CDATA[<p>Great writeup. I started out on RSpec, and then fell in love with shoulda. It&#8217;s good to see that it&#8217;s pretty straight-forward to do something similar in RSpec.</p>
<p>@Yossef:</p>
<p>it_should_assign is a class method, therefore, wouldn&#8217;t have access to instance variables, like @users_photo.</p>
<p>The &#8216;it&#8217; block inside &#8216;it_should_assign&#8217; eventually defines an instance method, so it would have access to the instance variable. And that&#8217;s exactly what it does with &#8216;value = instance_variable_get(value)&#8217;.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
