<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.vitarara.org/cms" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>Vita Rara: A Life Uncommon - Shoulda</title>
 <link>http://www.vitarara.org/cms/taxonomy/term/103/all</link>
 <description></description>
 <language>en</language>
<item>
 <title>Rspec &amp; Shoulda: Specifying the Object Under Test</title>
 <link>http://www.vitarara.org/cms/node/179</link>
 <description>&lt;p&gt;Today we needed to test conditional validations on a model. We&#039;re using RSpec with the Shoulda macros to do this. Our model looks something like:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.vitarara.org/cms/node/179&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.vitarara.org/cms/node/179#comment</comments>
 <category domain="http://www.vitarara.org/cms/taxonomy/term/110">RSpec</category>
 <category domain="http://www.vitarara.org/cms/taxonomy/term/83">Ruby on Rails</category>
 <category domain="http://www.vitarara.org/cms/taxonomy/term/103">Shoulda</category>
 <pubDate>Fri, 10 Jul 2009 16:31:37 -0400</pubDate>
 <dc:creator>Mark</dc:creator>
 <guid isPermaLink="false">179 at http://www.vitarara.org/cms</guid>
</item>
<item>
 <title>Shoulda: should_validate_uniqueness_of</title>
 <link>http://www.vitarara.org/cms/should_validate_uniqueness_of</link>
 <description>&lt;p&gt;When testing an ActiveRecord model that validates_uniqueness_of using Shoulda&#039;s should_validate_uniqueness_of macro it needs to be wrapped in a context where an instance of the model is created in the database. If there is no record in the database to validate against you&#039;ll get an error. &lt;/p&gt;
&lt;p&gt;For more information see: &lt;a href=&quot;http://thoughtbot.lighthouseapp.com/projects/5807/tickets/164-should_validate_uniqueness_of-model-case_sensitive-false-doesnt-validate-at-least-for-me&quot;&gt;Lighthouse Ticket&lt;/a&gt;.&lt;/p&gt;
</description>
 <comments>http://www.vitarara.org/cms/should_validate_uniqueness_of#comment</comments>
 <category domain="http://www.vitarara.org/cms/taxonomy/term/82">Ruby</category>
 <category domain="http://www.vitarara.org/cms/taxonomy/term/83">Ruby on Rails</category>
 <category domain="http://www.vitarara.org/cms/taxonomy/term/103">Shoulda</category>
 <category domain="http://www.vitarara.org/cms/taxonomy/term/104">Testing</category>
 <pubDate>Fri,  6 Mar 2009 11:43:18 -0500</pubDate>
 <dc:creator>Mark</dc:creator>
 <guid isPermaLink="false">176 at http://www.vitarara.org/cms</guid>
</item>
</channel>
</rss>

