<?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>Mindtonic &#187; shoulda</title>
	<atom:link href="http://blog.mindtonic.net/tag/shoulda/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mindtonic.net</link>
	<description>Thoughts on Music and Application Development</description>
	<lastBuildDate>Fri, 30 Jul 2010 18:08:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Webrat for integration testing</title>
		<link>http://blog.mindtonic.net/webrat-for-integration-testing/</link>
		<comments>http://blog.mindtonic.net/webrat-for-integration-testing/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 16:51:34 +0000</pubDate>
		<dc:creator>mindtonic</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[factory_girl]]></category>
		<category><![CDATA[shoulda]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[webrat]]></category>

		<guid isPermaLink="false">http://blog.mindtonic.net/?p=105</guid>
		<description><![CDATA[Webrat: http://github.com/brynary/webrat/tree/master http://gitrdoc.com/brynary/webrat/tree/master http://codese.wordpress.com/2009/02/05/using-shoulda-webrat-to-write-integration-tests-for-rails/ http://blog.bitmacro.com/2008/11/14/shoulda-factory_girl-webrat Integration Testing: http://weblog.jamisbuck.org/2006/3/9/integration-testing-in-rails-1-1 http://www.martinfowler.com/articles/continuousIntegration.html http://api.rubyonrails.org/classes/ActionController/Integration/Session.html http://locomotivation.squeejee.com/post/109227509/ruby-on-rails-integration-testing-with-integrity http://ajaxonrails.wordpress.com/2006/11/02/integration-testing-in-ruby-on-rails-how-to-maintain-sessions-while-testing-in-rails/ http://bhanoo.blogspot.com/2007/09/rails-integration-testing.html http://blog.danielwellman.com/2008/06/writing-rails-integration-tests-with-webrat.html http://6brand.com/rails-integration-testing-how-to-learn.html]]></description>
			<content:encoded><![CDATA[<p><strong>Webrat:</strong></p>
<ul>
<li><a href="http://github.com/brynary/webrat/tree/master">http://github.com/brynary/webrat/tree/master</a></li>
<li><a href="http://gitrdoc.com/brynary/webrat/tree/master">http://gitrdoc.com/brynary/webrat/tree/master</a></li>
<li><a href="http://codese.wordpress.com/2009/02/05/using-shoulda-webrat-to-write-integration-tests-for-rails/">http://codese.wordpress.com/2009/02/05/using-shoulda-webrat-to-write-integration-tests-for-rails/</a></li>
<li><a href="http://blog.bitmacro.com/2008/11/14/shoulda-factory_girl-webrat">http://blog.bitmacro.com/2008/11/14/shoulda-factory_girl-webrat</a></li>
</ul>
<p><strong>Integration Testing:</strong></p>
<ul>
<li><a href=" http://weblog.jamisbuck.org/2006/3/9/integration-testing-in-rails-1-1"> http://weblog.jamisbuck.org/2006/3/9/integration-testing-in-rails-1-1</a></li>
<li><a href="http://www.martinfowler.com/articles/continuousIntegration.html">http://www.martinfowler.com/articles/continuousIntegration.html</a></li>
<li><a href="http://api.rubyonrails.org/classes/ActionController/Integration/Session.html">http://api.rubyonrails.org/classes/ActionController/Integration/Session.html</a></li>
<li><a href="http://locomotivation.squeejee.com/post/109227509/ruby-on-rails-integration-testing-with-integrity">http://locomotivation.squeejee.com/post/109227509/ruby-on-rails-integration-testing-with-integrity</a></li>
<li><a href="http://ajaxonrails.wordpress.com/2006/11/02/integration-testing-in-ruby-on-rails-how-to-maintain-sessions-while-testing-in-rails/">http://ajaxonrails.wordpress.com/2006/11/02/integration-testing-in-ruby-on-rails-how-to-maintain-sessions-while-testing-in-rails/</a></li>
<li><a href="http://bhanoo.blogspot.com/2007/09/rails-integration-testing.html">http://bhanoo.blogspot.com/2007/09/rails-integration-testing.html</a></li>
<li><a href="http://blog.danielwellman.com/2008/06/writing-rails-integration-tests-with-webrat.html">http://blog.danielwellman.com/2008/06/writing-rails-integration-tests-with-webrat.html</a></li>
<li><a href="http://6brand.com/rails-integration-testing-how-to-learn.html">http://6brand.com/rails-integration-testing-how-to-learn.html</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.mindtonic.net/webrat-for-integration-testing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>should_eventually write this test</title>
		<link>http://blog.mindtonic.net/should_eventually-write-this-test/</link>
		<comments>http://blog.mindtonic.net/should_eventually-write-this-test/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 15:46:03 +0000</pubDate>
		<dc:creator>mindtonic</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[shoulda]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://blog.mindtonic.net/?p=103</guid>
		<description><![CDATA[One thing I liked about rspec was the ability to define tests that you had not yet written. That way you could remind yourself when running the test suite that there are things still to do. Previously in Shoulda, I have been writing these kinds of tests in all caps and using &#8220;assert false&#8221; to [...]]]></description>
			<content:encoded><![CDATA[<p>One thing I liked about rspec was the ability to define tests that you had not yet written.  That way you could remind yourself when running the test suite that there are things still to do.  Previously in Shoulda, I have been writing these kinds of tests in all caps and using &#8220;assert false&#8221; to trigger failure and remind me of future work.  Turns out there is a nifty way to do it with Shoulda. (I should have guessed there would be!)</p>
<pre>
should_eventually "do something"

#or just leave off the block
should "do something"
</pre>
<p>Thanks to <a href="http://blog.blenderbox.com/2008/12/12/shoulda-todo-list-integration-test/">BlenderBox</a> for bringing this to my attention while researching Shoulda integration testing.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mindtonic.net/should_eventually-write-this-test/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Factory Girl stringify_keys error in Create Test</title>
		<link>http://blog.mindtonic.net/factory-girl-stringify_keys-error-in-create-test/</link>
		<comments>http://blog.mindtonic.net/factory-girl-stringify_keys-error-in-create-test/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 21:52:21 +0000</pubDate>
		<dc:creator>mindtonic</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[factory_girl]]></category>
		<category><![CDATA[shoulda]]></category>

		<guid isPermaLink="false">http://blog.mindtonic.net/?p=50</guid>
		<description><![CDATA[I was getting the following error while trying to test the create method of a controller using factory_girl and shoulda: NoMethodError: undefined method `stringify_keys!` The error was that I am sending an object to the create method, which actually requires a hash of attributes&#8230; the solution is to use factory_girl&#8217;s attributes_for method. Hope this helps! [...]]]></description>
			<content:encoded><![CDATA[<p>I was getting the following error while trying to test the create method of a controller using <a href="http://github.com/thoughtbot/factory_girl/tree/master">factory_girl</a> and <a href="http://github.com/thoughtbot/shoulda/tree/master">shoulda</a>:</p>
<p><code>NoMethodError: undefined method `stringify_keys!`</code></p>
<p>The error was that I am sending an object to the create method, which actually requires a hash of attributes&#8230; the solution is to use factory_girl&#8217;s <strong>attributes_for</strong> method. </p>
<p>Hope this helps!</p>
<textarea cols="40" rows="10" name="code" class="Ruby">My testing code looked like this:

context "on POST to :create" do
  setup { post :create, :expense => Factory.build(:expense) }
    
  should_assign_to :expense
  should_redirect_to("the expense's show page") { expense_url(assigns(:expense)) } 
  should_set_the_flash_to(/created/i)
end

The correct code is:

context "on POST to :create" do
  setup { post :create, :expense => Factory.attributes_for(:expense) }
    
  should_assign_to :expense
  should_redirect_to("the expense's show page") { expense_url(assigns(:expense)) } 
  should_set_the_flash_to(/created/i)
end
</code></textarea>
	<!-- WordPress Code Snippet -->
	<script type="text/javascript" src="http://blog.mindtonic.net/wp-content/plugins/wordpress-code-snippet/js/shCore.js"></script><script type="text/javascript" src="http://blog.mindtonic.net/wp-content/plugins/wordpress-code-snippet/js/shBrushRuby.js"></script>
	<link type="text/css" rel="stylesheet" href="http://blog.mindtonic.net/wp-content/plugins/wordpress-code-snippet/css/SyntaxHighlighter.css"/>
	
	<script language="javascript">
	dp.SyntaxHighlighter.ClipboardSwf = 'http://blog.mindtonic.net/wp-content/plugins/wordpress-code-snippet/js/clipboard.swf';
	dp.SyntaxHighlighter.HighlightAll('code');
	</script>
	<!-- End WordPress Code Snippet -->
	]]></content:encoded>
			<wfw:commentRss>http://blog.mindtonic.net/factory-girl-stringify_keys-error-in-create-test/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shoulda Testing With Ultrasphinx</title>
		<link>http://blog.mindtonic.net/shoulda-testing-with-ultrasphinx/</link>
		<comments>http://blog.mindtonic.net/shoulda-testing-with-ultrasphinx/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 19:38:36 +0000</pubDate>
		<dc:creator>mindtonic</dc:creator>
				<category><![CDATA[Rails Plugins]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[shoulda]]></category>
		<category><![CDATA[sphinx]]></category>
		<category><![CDATA[ultrasphinx]]></category>

		<guid isPermaLink="false">http://blog.mindtonic.net/?p=6</guid>
		<description><![CDATA[I use the Shoulda testing framework for my Rails applications. After installing and beginning to use the Ultrasphinx plugin, I needed to figure out how to configure and run in a testing environment. This blog entry held the answer: Stephen Celis: Testing with Ultrasphinx]]></description>
			<content:encoded><![CDATA[<p>I use the <a href="http://thoughtbot.com/projects/shoulda/">Shoulda</a> testing framework for my Rails applications.  After installing and beginning to use the <a href="http://github.com/fauna/ultrasphinx/tree/master">Ultrasphinx plugin</a>, I needed to figure out how to configure and run in a testing environment.  This blog entry held the answer: <a href="http://stephencelis.com/archive/2008/4/testing-with-ultrasphinx/">Stephen Celis: Testing with Ultrasphinx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mindtonic.net/shoulda-testing-with-ultrasphinx/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
