<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Rails on the Run &#187; testing</title>
	<atom:link href="http://railsontherun.com/tag/testing/feed/" rel="self" type="application/rss+xml" />
	<link>http://railsontherun.com</link>
	<description>Rails experiments by Matt Aimonetti</description>
	<lastBuildDate>Tue, 23 Feb 2010 07:28:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>db fixtures replacement solution step by step</title>
		<link>http://railsontherun.com/2008/09/07/db-fixtures-replacement-solution-step-by-step/</link>
		<comments>http://railsontherun.com/2008/09/07/db-fixtures-replacement-solution-step-by-step/#comments</comments>
		<pubDate>Sun, 07 Sep 2008 16:06:00 +0000</pubDate>
		<dc:creator>Matt Aimonetti</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[datamapper]]></category>
		<category><![CDATA[factory_girl]]></category>
		<category><![CDATA[fixtures]]></category>
		<category><![CDATA[merb]]></category>
		<category><![CDATA[RSpec]]></category>
		<category><![CDATA[spec]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://railsontherun.com/2008/09/07/db-fixtures-replacement-solution-step-by-step</guid>
		<description><![CDATA[Like most people who started with Rails a while back, I first loved Rails fixtures and ended up hating them (slow, a pain to maintain etc&#8230;).
I went through different experiments, trying different existing libs, writing my own solutions etc&#8230; I wasn&#8217;t quite satisfied until I found factory_girl from thoughtbot.
You might not feel the need for [...]]]></description>
			<content:encoded><![CDATA[<p>Like most people who started with Rails a while back, I first loved Rails fixtures and ended up hating them (slow, a pain to maintain etc&#8230;).</p>
<p>I went through different experiments, trying different existing libs, writing my own solutions etc&#8230; I wasn&#8217;t quite satisfied until I found <a href="http://github.com/thoughtbot/factory_girl">factory_girl</a> from <a href="http://www.thoughtbot.com/">thoughtbot</a>.</p>
<p>You might not feel the need for a decent fixtures solution if you do a lot of mocking/stubbing, but I recently came back from my &#8220;mock everything you can outside of models&#8221; approach and I&#8217;m getting closer to the <a href="http://snipr.com/3nwry">mock roles, not objects</a> approach. So, I&#8217;m loosing my model/controller testing separation but I&#8217;m gaining by not having to maintain &#8220;dumb mocks&#8221; which don&#8217;t always represent the real API behind. I mean, how many times did I change a Model, messing up my app but all my specs were still passing. Anyway, that&#8217;s a long discussion, which will be covered by <a href="http://yehudakatz.com/">wycats</a> during <a href="http://merbcamp.com">merbcamp</a></p>
<p>So here is a simple example of how I use <a href="http://github.com/thoughtbot/factory_girl">factory girl</a> in a Merb + DataMapper app. (you can do the same in a Rails app, there is <strong>nothing</strong> specific to Merb in factory_girl).</p>
<ul>
<li>I. create an empty app, set the ORM etc&#8230;</li>
<li>II. git pull and install factory<em>girl from <a href="http://github.com/thoughtbot/factory_girl/tree/master">http://github.com/thoughtbot/factory</a></em><a href="http://github.com/thoughtbot/factory_girl/tree/master">girl/tree/master</a>. Or install thoughtbot-factory_girl gem using <a href="http://gems.github.com">GitHub gem server</a>.</li>
<li><strong>III.</strong> create a spec/factories.rb file. (You might prefer to create a folder called spec/factories and add a factory per model)</li>
<li><strong>IV.</strong> modify spec_helper.rb and add the following</li>
</ul>
<pre class="brush:ruby">
  require 'factory_girl'
  require File.dirname(__FILE__) + '/factories'
</pre>
<ul>
<li>V. write some specs against a Client model</li>
</ul>
<p><script src="http://gist.github.com/9276.js"></script></p>
<ul>
<li><strong>VI.</strong> Create the Model</li>
</ul>
<p><script src="http://gist.github.com/9277.js"></script></p>
<ul>
<li><strong>VII.</strong> create a factory</li>
</ul>
<p><script src="http://gist.github.com/9278.js"></script></p>
<ul>
<li>
<strong>IIX.</strong> run your specs</p>
<p><img src="http://img.skitch.com/20080907-tf8yy6fi82b23t78stqii3mpbe.jpg" alt="failing specs" />
</li>
<li>
<strong>IX.</strong> fix the model (note that I set <code>dependencies "dm-validations"</code> in my init.rb)
</li>
</ul>
<p><script src="http://gist.github.com/9279.js"></script></p>
<ul>
<li>X. run the specs
<p><img src="http://img.skitch.com/20080907-m7p2r6q1qau4k3qsmeadwu2tur.jpg" alt="passing specs" /></li>
<li><strong>XI.</strong> add more specs</li>
</ul>
<p><script src="http://gist.github.com/9264.js"></script></p>
<p>As you can see, Factory.build(:client) only creates a new instance of the Object, while Factory(:client) creates, saves and loads the instance.</p>
<ul>
<li><strong>XII.</strong> get them to pass</li>
</ul>
<p><script src="http://gist.github.com/9265.js"></script></p>
<p>Factory Girl makes fixtures simple and clean. Here is another example for creating associations:</p>
<p><script src="http://gist.github.com/9269.js"></script></p>
<p>Factory Girl also supports sequencing, check out FG <a href="http://github.com/thoughtbot/factory_girl">read me</a></p>
<h2>In conclusion, Factory Girl is a mature and solid factory solution which will take you less than 15 minutes to get used to. It will offer you loads of flexibility and less frustration than good old yaml fixtures. You can also use it with existing fixtures if you want to start using it in an existing app.</h2>
]]></content:encoded>
			<wfw:commentRss>http://railsontherun.com/2008/09/07/db-fixtures-replacement-solution-step-by-step/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Misc tips and tricks</title>
		<link>http://railsontherun.com/2008/01/30/misc-tips-and-tricks/</link>
		<comments>http://railsontherun.com/2008/01/30/misc-tips-and-tricks/#comments</comments>
		<pubDate>Wed, 30 Jan 2008 08:00:00 +0000</pubDate>
		<dc:creator>Matt Aimonetti</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[autotest]]></category>
		<category><![CDATA[BDD]]></category>
		<category><![CDATA[integration]]></category>
		<category><![CDATA[RSpec]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[zentest]]></category>

		<guid isPermaLink="false">http://railsontherun.com/2008/01/30/misc-tips-and-tricks</guid>
		<description><![CDATA[I haven&#8217;t posted for quite a long time. The thing is I moved to a new place and I&#8217;m really busy on working clients + setting up my new office + dealing with way too much paperwork. 
Anyway, enough excuses, here are few tips that I believe will be useful to some of you:
ZenTest Autotest
I [...]]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t posted for quite a long time. The thing is I moved to a new place and I&#8217;m really busy on working clients + setting up my new office + dealing with way too much paperwork. </p>
<p>Anyway, enough excuses, here are few tips that I believe will be useful to some of you:</p>
<h2><a href="http://www.zenspider.com/ZSS/Products/ZenTest/">ZenTest Autotest</a></h2>
<p>I love autotest, but you might have noticed that sometimes (especially on big projects), ZenTest might start using more CPU than expected. On my machine, that results in the fan going off and annoying the crap out of me.</p>
<p>The solution is quite simple, exclude all folders you don&#8217;t need to monitor. To do that, update ZenTest to version 3.8.X </p>
<pre><code>sudo gem update ZenTest
</code></pre>
<p>(older version had a different syntax)</p>
<p>Now, edit your .autotest that should be located in ~/.autotest  (if it doesn&#8217;t exist, create it).</p>
<p>Finally add the following code:</p>
<table class="CodeRay">
<tr>
<td class="line_numbers" title="click to toggle" onclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }">
<pre>1<tt>
</tt>2<tt>
</tt>3<tt>
</tt>4<tt>
</tt></pre>
</td>
<td class="code">
<pre ondblclick="with (this.style) { overflow = (overflow == 'auto' || overflow == '') ? 'visible' : 'auto' }"><tt>
</tt>  <span class="co">Autotest</span>.add_hook <span class="sy">:initialize</span> <span class="r">do</span> |at|<tt>
</tt>    <span class="s"><span class="dl">%w{</span><span class="k">.svn .hg .git vendor</span><span class="dl">}</span></span>.each {|exception| at.add_exception(exception)}<tt>
</tt>  <span class="r">end</span><tt>
</tt></pre>
</td>
</tr>
</table>
<p>I personally freeze rails in vendor and I autotest is way happier when it doesn&#8217;t have to monitor some extra files. (note that we also exclude folders such as .git or .svn)<br />
(you can also include files etc&#8230; read more <a href="http://blog.davidchelimsky.net/articles/2008/01/15/rspec-1-1-2-and-zentest-3-8-0">there</a>)</p>
<h2><a href="http://rspec.info">RSpec</a></h2>
<p>RSpec is certainly my favorite Ruby tool and I&#8217;m glad to say that most of my <a href="http://sdruby.com/">SD.rb</a> friends finally got convinced!</p>
<p>Now, few people complained to me about spec failures outputting the full stack such as:</p>
<table class="CodeRay">
<tr>
<td class="line_numbers" title="click to toggle" onclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }">
<pre>1<tt>
</tt>2<tt>
</tt>3<tt>
</tt>4<tt>
</tt><strong>5</strong><tt>
</tt>6<tt>
</tt>7<tt>
</tt>8<tt>
</tt>9<tt>
</tt><strong>10</strong><tt>
</tt>11<tt>
</tt>12<tt>
</tt>13<tt>
</tt>14<tt>
</tt><strong>15</strong><tt>
</tt>16<tt>
</tt>17<tt>
</tt>18<tt>
</tt>19<tt>
</tt><strong>20</strong><tt>
</tt>21<tt>
</tt>22<tt>
</tt>23<tt>
</tt>24<tt>
</tt><strong>25</strong><tt>
</tt>26<tt>
</tt></pre>
</td>
<td class="code">
<pre ondblclick="with (this.style) { overflow = (overflow == 'auto' || overflow == '') ? 'visible' : 'auto' }"><tt>
</tt> <span class="co">The</span> <span class="co">Sessions</span> controller should fail since it<span class="s"><span class="dl">'</span><span class="k">s a test</span><span class="dl">'</span></span> <span class="co">FAILED</span><tt>
</tt> expected <span class="pc">true</span>, got <span class="pc">false</span><tt>
</tt> test_app-git/trunk/vendor/plugins/rspec/lib/spec/expectations.rb:<span class="i">52</span><span class="sy">:in</span> <span class="sh"><span class="dl">`</span><span class="k">fail_with'<tt>
</tt> test_app-git/trunk/vendor/plugins/rspec/lib/spec/expectations/handler.rb:21:in </span><span class="dl">`</span></span>handle_matcher<span class="s"><span class="dl">'</span><span class="k"><tt>
</tt> test_app-git/trunk/vendor/plugins/rspec/lib/spec/expectations/extensions/object.rb:34:in `should</span><span class="dl">'</span></span><tt>
</tt> ./spec/controllers/sessions_controller_spec.rb:<span class="i">25</span>:<tt>
</tt> test_app-git/trunk/vendor/plugins/rspec/lib/spec/example/example_methods.rb:<span class="i">78</span><span class="sy">:in</span> <span class="sh"><span class="dl">`</span><span class="k">instance_eval'<tt>
</tt> test_app-git/trunk/vendor/plugins/rspec/lib/spec/example/example_methods.rb:78:in </span><span class="dl">`</span></span>run_with_description_capturing<span class="s"><span class="dl">'</span><span class="k"><tt>
</tt> test_app-git/trunk/vendor/plugins/rspec/lib/spec/example/example_methods.rb:19:in `execute</span><span class="dl">'</span></span><tt>
</tt> <span class="rx"><span class="dl">/</span><span class="k">opt</span><span class="dl">/</span></span>local/lib/ruby/<span class="fl">1.8</span>/timeout.rb:<span class="i">48</span><span class="sy">:in</span> <span class="sh"><span class="dl">`</span><span class="k">timeout'<tt>
</tt> test_app-git/trunk/vendor/plugins/rspec/lib/spec/example/example_methods.rb:16:in </span><span class="dl">`</span></span>execute<span class="s"><span class="dl">'</span><span class="k"><tt>
</tt> test_app-git/trunk/vendor/plugins/rspec/lib/spec/example/example_group_methods.rb:288:in `execute_examples</span><span class="dl">'</span></span><tt>
</tt> test_app-git/trunk/vendor/plugins/rspec/lib/spec/example/example_group_methods.rb:<span class="i">287</span><span class="sy">:in</span> <span class="sh"><span class="dl">`</span><span class="k">each'<tt>
</tt> test_app-git/trunk/vendor/plugins/rspec/lib/spec/example/example_group_methods.rb:287:in </span><span class="dl">`</span></span>execute_examples<span class="s"><span class="dl">'</span><span class="k"><tt>
</tt> test_app-git/trunk/vendor/plugins/rspec/lib/spec/example/example_group_methods.rb:121:in `run</span><span class="dl">'</span></span><tt>
</tt> test_app-git/trunk/vendor/plugins/rspec/lib/spec/runner/example_group_runner.rb:<span class="i">22</span><span class="sy">:in</span> <span class="sh"><span class="dl">`</span><span class="k">run'<tt>
</tt> test_app-git/trunk/vendor/plugins/rspec/lib/spec/runner/example_group_runner.rb:21:in </span><span class="dl">`</span></span>each<span class="s"><span class="dl">'</span><span class="k"><tt>
</tt> test_app-git/trunk/vendor/plugins/rspec/lib/spec/runner/example_group_runner.rb:21:in `run</span><span class="dl">'</span></span><tt>
</tt> test_app-git/trunk/vendor/plugins/rspec/lib/spec/runner/options.rb:<span class="i">89</span><span class="sy">:in</span> <span class="sh"><span class="dl">`</span><span class="k">run_examples'<tt>
</tt> test_app-git/trunk/vendor/plugins/rspec/lib/spec/runner/command_line.rb:19:in </span><span class="dl">`</span></span>run<span class="s"><span class="dl">'</span><span class="k"><tt>
</tt> script/spec:4:<tt>
</tt><tt>
</tt>  Finished in 6.035147 seconds<tt>
</tt><tt>
</tt>  400 examples, 1 failure<tt>
</tt></span></span></pre>
</td>
</tr>
</table>
<p>We can really easily change that, open you spec.opts file located in your spec folder.</p>
<p>it probably looks like that:</p>
<table class="CodeRay">
<tr>
<td class="line_numbers" title="click to toggle" onclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }">
<pre>1<tt>
</tt>2<tt>
</tt>3<tt>
</tt>4<tt>
</tt><strong>5</strong><tt>
</tt>6<tt>
</tt>7<tt>
</tt>8<tt>
</tt></pre>
</td>
<td class="code">
<pre ondblclick="with (this.style) { overflow = (overflow == 'auto' || overflow == '') ? 'visible' : 'auto' }"><tt>
</tt>  --colour<tt>
</tt>  --format<tt>
</tt>  progress<tt>
</tt>  --loadby<tt>
</tt>  mtime<tt>
</tt>  --reverse<tt>
</tt>  --backtrace<tt>
</tt></pre>
</td>
</tr>
</table>
<p>Get rid of &#8220;&#8211;backtrace&#8221; and your new failure should look like:</p>
<table class="CodeRay">
<tr>
<td class="line_numbers" title="click to toggle" onclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }">
<pre>1<tt>
</tt>2<tt>
</tt>3<tt>
</tt>4<tt>
</tt><strong>5</strong><tt>
</tt>6<tt>
</tt>7<tt>
</tt>8<tt>
</tt>9<tt>
</tt><strong>10</strong><tt>
</tt>11<tt>
</tt></pre>
</td>
<td class="code">
<pre ondblclick="with (this.style) { overflow = (overflow == 'auto' || overflow == '') ? 'visible' : 'auto' }"><tt>
</tt>  <span class="i">1</span>)<tt>
</tt>  <span class="s"><span class="dl">'</span><span class="k">The Sessions controller The Sessions controller should fail since it</span><span class="dl">'</span></span>s a test<span class="s"><span class="dl">'</span><span class="k"> FAILED<tt>
</tt>  expected false, got true<tt>
</tt>  ./spec/controllers/sessions_controller_spec.rb:25:<tt>
</tt>  script/spec:4:<tt>
</tt><tt>
</tt>  Finished in 0.269956 seconds<tt>
</tt><tt>
</tt>  15 examples, 1 failure<tt>
</tt>  <tt>
</tt></span></span></pre>
</td>
</tr>
</table>
<h2>Other stuff you may find interesting (in no particular order):</h2>
<ul>
<li><a href="http://opensource.thinkrelevance.com/wiki/spec-converter">spec converter</a></li>
<li><a href="http://cells.rubyforge.org/overview.html">Rails Cell</a></li>
<li><a href="http://jointheconversation.org/railsgit">Git to manage and deploy a Rails app</a></li>
<li><a href="http://rufy.com/contacts/doc/">contacts (retrieve user&#8217;s contacts from yahoo, gmail etc..)</a></li>
<li><a href="http://www.hashrocket.com/">Hashrocket</a></li>
<li><a href="http://www.amazon.com/Rails-Way-Addison-Wesley-Professional-Ruby/dp/0321445619">one of the best Rails book of the moment</a></li>
<li><a href="http://famspam.com/">err&#8217;s new baby</a> </li>
<li><a href="http://blog.caboo.se/articles/2008/1/30/caboose-conf-2008">caboose conf 08</a></li>
<li><a href="http://github.com/">git hub</a></li>
<li><a href="http://swxruby.org/">SWX Ruby (or how to get Rails to talk with Flash even faster)</a></li>
<li><a href="http://ruby.reddit.com">Ruby Reddit</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://railsontherun.com/2008/01/30/misc-tips-and-tricks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RSpec on Rails Matchers plugin</title>
		<link>http://railsontherun.com/2008/01/04/rspec-on-rails-matchers-plugin/</link>
		<comments>http://railsontherun.com/2008/01/04/rspec-on-rails-matchers-plugin/#comments</comments>
		<pubDate>Fri, 04 Jan 2008 03:46:00 +0000</pubDate>
		<dc:creator>Matt Aimonetti</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[matchers]]></category>
		<category><![CDATA[RSpec]]></category>
		<category><![CDATA[test]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://railsontherun.com/2008/01/04/rspec-on-rails-matchers-plugin</guid>
		<description><![CDATA[RSpec is an awesome testing framework. On top of being the first Ruby BDD framework the core team is doing a great job in enhancing our testing experience and therefore the quality of our code.
This time, I don&#8217;t want to introduce to the latest changes but instead showing you what Josh Knowles, Bryan Helmkamp and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://rspec.info">RSpec</a> is an awesome testing framework. On top of being the first Ruby <a href="http://en.wikipedia.org/wiki/Behavior_driven_development">BDD</a> framework the core team is doing a great job in enhancing our testing experience and therefore the quality of our code.</p>
<p>This time, I don&#8217;t want to introduce to the <a href="http://rspec.info/changes.html">latest changes</a> but instead showing you what <a href="http://joshknowles.com">Josh Knowles</a>, <a href="http://www.brynary.com/">Bryan Helmkamp</a> and myself came up with.</p>
<p><a href="http://code.google.com/p/rspec-on-rails-matchers/">RSpec on Rails matchers plugin</a> + <a href="http://rspec-on-rails-matchers.googlecode.com/svn/textmate-bundle/RSpecOnRailsMatchers.tmbundle.zip">TextMate Bundle</a></p>
<p>Matchers are some sort of helpers that will help you cleaning up your tests. We simply came up with a collection of matchers that we think will make your like easier.</p>
<p>We divided the matchers in 3 categories:</p>
<h2>Associations</h2>
<p>Verify that the association has been defined. (doesn&#8217;t verify that the association works!)</p>
<p><em>Usage examples:</em></p>
<table class="CodeRay">
<tr>
<td class="line_numbers" title="click to toggle" onclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }">
<pre>1<tt>
</tt>2<tt>
</tt>3<tt>
</tt>4<tt>
</tt><strong>5</strong><tt>
</tt>6<tt>
</tt>7<tt>
</tt>8<tt>
</tt></pre>
</td>
<td class="code">
<pre ondblclick="with (this.style) { overflow = (overflow == 'auto' || overflow == '') ? 'visible' : 'auto' }"><tt>
</tt>    <span class="iv">@post</span>.should have_many(<span class="sy">:comments</span>)<tt>
</tt>  <tt>
</tt>    <span class="iv">@comment</span>.should belong_to(<span class="sy">:post</span>)<tt>
</tt>  <tt>
</tt>    <span class="iv">@user</span>.should have_one(<span class="sy">:social_security_number</span>)<tt>
</tt>  <tt>
</tt>    <span class="iv">@project</span>.should have_and_belong_to_many(<span class="sy">:categories</span>)<tt>
</tt></pre>
</td>
</tr>
</table>
<h2>Validations</h2>
<p>Verify that a validation has been defined. (doesn&#8217;t test the validation itself)</p>
<table class="CodeRay">
<tr>
<td class="line_numbers" title="click to toggle" onclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }">
<pre>1<tt>
</tt>2<tt>
</tt>3<tt>
</tt>4<tt>
</tt><strong>5</strong><tt>
</tt>6<tt>
</tt>7<tt>
</tt>8<tt>
</tt>9<tt>
</tt><strong>10</strong><tt>
</tt></pre>
</td>
<td class="code">
<pre ondblclick="with (this.style) { overflow = (overflow == 'auto' || overflow == '') ? 'visible' : 'auto' }"><tt>
</tt>    object.should validate_presence_of(<span class="sy">:attribute</span>)<tt>
</tt><tt>
</tt>    object.should validate_confirmation_of(<span class="sy">:attribute</span>)<tt>
</tt><tt>
</tt>    object.should validate_uniqueness_of(<span class="sy">:attribute</span>)<tt>
</tt><tt>
</tt>    object.should validate_length_of(<span class="sy">:attribute</span>, <span class="sy">:between</span> =&gt; <span class="i">5</span>..<span class="i">10</span>)<tt>
</tt>    <tt>
</tt>    object.should validate_length_of(<span class="sy">:attribute</span>, <span class="sy">:is</span> =&gt; <span class="i">5</span>)<tt>
</tt></pre>
</td>
</tr>
</table>
<h2>Views</h2>
<p>My personal favorite matchers, you can now do stuff like:</p>
<table class="CodeRay">
<tr>
<td class="line_numbers" title="click to toggle" onclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }">
<pre>1<tt>
</tt>2<tt>
</tt>3<tt>
</tt>4<tt>
</tt><strong>5</strong><tt>
</tt>6<tt>
</tt>7<tt>
</tt>8<tt>
</tt>9<tt>
</tt><strong>10</strong><tt>
</tt>11<tt>
</tt>12<tt>
</tt></pre>
</td>
<td class="code">
<pre ondblclick="with (this.style) { overflow = (overflow == 'auto' || overflow == '') ? 'visible' : 'auto' }"><tt>
</tt>    it <span class="s"><span class="dl">&quot;</span><span class="k">should render new form</span><span class="dl">&quot;</span></span> <span class="r">do</span><tt>
</tt>        render <span class="s"><span class="dl">&quot;</span><span class="k">/users/new.html.erb</span><span class="dl">&quot;</span></span><tt>
</tt><tt>
</tt>        response.should have_form_posting_to(users_path) <span class="r">do</span><tt>
</tt>          with_text_field_for(<span class="sy">:user_name</span>)<tt>
</tt>          with_text_area_for(<span class="sy">:user_address</span>)<tt>
</tt>          with_text_field_for(<span class="sy">:user_login</span>)<tt>
</tt>          with_text_field_for(<span class="sy">:user_email</span>)<tt>
</tt>          with_submit_button<tt>
</tt>        <span class="r">end</span><tt>
</tt>    <span class="r">end</span><tt>
</tt></pre>
</td>
</tr>
</table>
<p>Check the <a href="http://rspec-on-rails-matchers.googlecode.com/svn/trunk/README">readme</a> for more information and details on the added matchers. I personally recommend you try the <a href="http://rspec-on-rails-matchers.googlecode.com/svn/textmate-bundle/RSpecOnRailsMatchers.tmbundle.zip">TextMate Bundle</a> on top of being a perfect tool for lazy devs, it also lists all the available matchers and is an excellent way of learning.</p>
<p>We just released our first release yesterday, this is not a final version and we will keep on improving the code. If you have suggestions and patches feel free to open a ticket <a href="http://code.google.com/p/rspec-on-rails-matchers/issues/lis">there</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://railsontherun.com/2008/01/04/rspec-on-rails-matchers-plugin/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Autotest with sound FX</title>
		<link>http://railsontherun.com/2007/08/02/autotest-with-sound-fx/</link>
		<comments>http://railsontherun.com/2007/08/02/autotest-with-sound-fx/#comments</comments>
		<pubDate>Thu, 02 Aug 2007 08:07:00 +0000</pubDate>
		<dc:creator>Matt Aimonetti</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[autotest]]></category>
		<category><![CDATA[continuous integration]]></category>
		<category><![CDATA[RSpec]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[zentest]]></category>

		<guid isPermaLink="false">http://railsontherun.com/2007/08/02/autotest-with-sound-fx</guid>
		<description><![CDATA[In case you missed the latest great extension for Zentest Autotest, here is the blog post you have to read.
Jeremy from Switzerland came up with this great idea of adding audio report to Autotest. I&#8217;ve been using Growl to notify me when my tests would pass or fail, but I simply love just hearing a [...]]]></description>
			<content:encoded><![CDATA[<p>In case you missed the latest great extension for <a href="http://www.zenspider.com/ZSS/Products/ZenTest">Zentest Autotest</a>, here is <a href="http://fozworks.com/2007/7/28/autotest-sound-effects">the blog post</a> you have to read.</p>
<p>Jeremy from Switzerland came up with this great idea of adding audio report to Autotest. I&#8217;ve been using <a href="http://railstips.org/2007/7/23/autotest-growl-pass-fail-notifications">Growl</a> to notify me when my tests would pass or fail, but I simply love just hearing a different sound based on the result of the tests.</p>
<p><img src="http://farm2.static.flickr.com/1180/982723651_2a183dc8db.jpg?v=0" alt="growl"/> (screenshot from <a href="http://railstips.org/2007/7/23/autotest-growl-pass-fail-notifications">this post</a>)</p>
<p>Watch the <a href="http://fozworks.com/static/autotest-sound10.html">screencast</a></p>
<p>p.s: I&#8217;m working on redesigning this blog, I don&#8217;t have much time and I hate IE <img src='http://railsontherun.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I hope to get things fixed soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://railsontherun.com/2007/08/02/autotest-with-sound-fx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

