<?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: 2 techniques for rails testing without fixtures</title>
	<atom:link href="http://scoop.simplyexcited.co.uk/2007/11/13/2-techniques-for-rails-testing-without-fixtures/feed/" rel="self" type="application/rss+xml" />
	<link>http://scoop.simplyexcited.co.uk/2007/11/13/2-techniques-for-rails-testing-without-fixtures/</link>
	<description>Technology, Design and Outdoor</description>
	<lastBuildDate>Fri, 16 Dec 2011 10:35:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: pyrat</title>
		<link>http://scoop.simplyexcited.co.uk/2007/11/13/2-techniques-for-rails-testing-without-fixtures/comment-page-1/#comment-728</link>
		<dc:creator>pyrat</dc:creator>
		<pubDate>Wed, 14 Nov 2007 10:11:46 +0000</pubDate>
		<guid isPermaLink="false">http://scoop.cheerfactory.co.uk/2007/11/13/2-techniques-for-rails-testing-without-fixtures/#comment-728</guid>
		<description>Thanks for the comment SP.

I hope to use Rspec for the next project that I work on. I went to the Rspec tutorial at railsconf europe and was intrigued.

I&#039;ll let you know how it goes.</description>
		<content:encoded><![CDATA[	<p>Thanks for the comment SP.</p>

	<p>I hope to use Rspec for the next project that I work on. I went to the Rspec tutorial at railsconf europe and was intrigued.</p>

	<p>I&#8217;ll let you know how it goes.</p>
 ]]></content:encoded>
	</item>
	<item>
		<title>By: SP</title>
		<link>http://scoop.simplyexcited.co.uk/2007/11/13/2-techniques-for-rails-testing-without-fixtures/comment-page-1/#comment-727</link>
		<dc:creator>SP</dc:creator>
		<pubDate>Tue, 13 Nov 2007 23:08:24 +0000</pubDate>
		<guid isPermaLink="false">http://scoop.cheerfactory.co.uk/2007/11/13/2-techniques-for-rails-testing-without-fixtures/#comment-727</guid>
		<description>Good to see people that have recently converted to TDD are starting to realize the errors of the fixture ways.  However, what you are doing here is just creating fixtures in Ruby code (rather than the YAML fixtures).  I have noticed far superior &quot;testing&quot; can be achieved by using RSpec and adopting the BDD ways instead of regression-heavy TDD way.  I see a big difference between the two (TDD and BDD).

Many old hat extreme prgrammers (XPers) find the BDD way unintuitive, but I find the BDD a more comprehensive way to &quot;specify&quot; your software.  The mindset shift you need to make coming from regression-heavy TDD mindset is that you need to start thinking about testing software contracts instead of asserting output data values assuming certain input data.

If you start a new Rails (or any Ruby) project, I would strong suggest you use RSpec instead of Test::Unit and take full advantage of the builtin mocking and stubbing, so fixtures (even ones created in Ruby code) will be a thing of the past.

If you find the RSpec way a little too much you can also utilize mocha to mocking objects decently.  The only major benefit you miss by going half assed with Test::Unit+mocha is that you don&#039;t have the syntactic sugar, which surprisingly provides clarity while thinking about your software specifications.</description>
		<content:encoded><![CDATA[	<p>Good to see people that have recently converted to <span class="caps">TDD</span> are starting to realize the errors of the fixture ways.  However, what you are doing here is just creating fixtures in Ruby code (rather than the <span class="caps">YAML</span> fixtures).  I have noticed far superior &#8220;testing&#8221; can be achieved by using RSpec and adopting the <span class="caps">BDD</span> ways instead of regression-heavy <span class="caps">TDD</span> way.  I see a big difference between the two (TDD and <span class="caps">BDD</span>).</p>

	<p>Many old hat extreme prgrammers (XPers) find the <span class="caps">BDD</span> way unintuitive, but I find the <span class="caps">BDD</span> a more comprehensive way to &#8220;specify&#8221; your software.  The mindset shift you need to make coming from regression-heavy <span class="caps">TDD</span> mindset is that you need to start thinking about testing software contracts instead of asserting output data values assuming certain input data.</p>

	<p>If you start a new Rails (or any Ruby) project, I would strong suggest you use RSpec instead of Test::Unit and take full advantage of the builtin mocking and stubbing, so fixtures (even ones created in Ruby code) will be a thing of the past.</p>

	<p>If you find the RSpec way a little too much you can also utilize mocha to mocking objects decently.  The only major benefit you miss by going half assed with Test::Unit+mocha is that you don&#8217;t have the syntactic sugar, which surprisingly provides clarity while thinking about your software specifications.</p>
 ]]></content:encoded>
	</item>
</channel>
</rss>

