<?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: Testing in Rails: Part 7 - ActiveRecord Relationships</title>
	<atom:link href="http://www.nullislove.com/2008/01/08/testing-in-rails-part-7-activerecord-relationships/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nullislove.com/2008/01/08/testing-in-rails-part-7-activerecord-relationships/</link>
	<description>Code for Coders</description>
	<pubDate>Thu, 20 Nov 2008 17:54:04 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Kevin Skoglund</title>
		<link>http://www.nullislove.com/2008/01/08/testing-in-rails-part-7-activerecord-relationships/#comment-1231</link>
		<dc:creator>Kevin Skoglund</dc:creator>
		<pubDate>Mon, 04 Aug 2008 13:48:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.nullislove.com/2008/01/08/testing-in-rails-part-7-activerecord-relationships/#comment-1231</guid>
		<description>@Denis: Yes, that would work too.  As long as you understand the difference.

In my example, the idea is that I'm testing two things to make sure they are the EXACT value I expect.  In your example, the idea is that you don't care what value they have, just that they are equal.  If @merlot.winery_id and @merlot.winery.id both have a value of 4 then my tests will fail and yours will pass.

The way you decide to write your tests will determine if that distinction makes a difference or not.</description>
		<content:encoded><![CDATA[<p>@Denis: Yes, that would work too.  As long as you understand the difference.</p>
<p>In my example, the idea is that I&#8217;m testing two things to make sure they are the EXACT value I expect.  In your example, the idea is that you don&#8217;t care what value they have, just that they are equal.  If @merlot.winery_id and @merlot.winery.id both have a value of 4 then my tests will fail and yours will pass.</p>
<p>The way you decide to write your tests will determine if that distinction makes a difference or not.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Denis</title>
		<link>http://www.nullislove.com/2008/01/08/testing-in-rails-part-7-activerecord-relationships/#comment-1230</link>
		<dc:creator>Denis</dc:creator>
		<pubDate>Mon, 04 Aug 2008 03:56:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.nullislove.com/2008/01/08/testing-in-rails-part-7-activerecord-relationships/#comment-1230</guid>
		<description>In the first relationship test, you wrote:
  def test_relationships
    # belongs_to :winery
    assert_equal(1, @merlot.winery_id)
    assert_equal(1, @merlot.winery.id)
[...]

Could we just write this?
  def test_relationships
    # belongs_to :winery
    assert_equal(@merlot.winery.id, @merlot.winery_id)
[...]


Thanks
Denis</description>
		<content:encoded><![CDATA[<p>In the first relationship test, you wrote:<br />
  def test_relationships<br />
    # belongs_to :winery<br />
    assert_equal(1, @merlot.winery_id)<br />
    assert_equal(1, @merlot.winery.id)<br />
[...]</p>
<p>Could we just write this?<br />
  def test_relationships<br />
    # belongs_to :winery<br />
    assert_equal(@merlot.winery.id, @merlot.winery_id)<br />
[...]</p>
<p>Thanks<br />
Denis</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Improbabilidades</title>
		<link>http://www.nullislove.com/2008/01/08/testing-in-rails-part-7-activerecord-relationships/#comment-1064</link>
		<dc:creator>Improbabilidades</dc:creator>
		<pubDate>Tue, 18 Mar 2008 14:12:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.nullislove.com/2008/01/08/testing-in-rails-part-7-activerecord-relationships/#comment-1064</guid>
		<description>&lt;strong&gt;Testing relationships in&#160;Rails...&lt;/strong&gt;

Ler este artigo em português
I've been looking for an elegant way to test relationships using Rais, and think it's interesting how so few people really care about it. Most simply say that it's up to the framework to test it's o...</description>
		<content:encoded><![CDATA[<p><strong>Testing relationships in&nbsp;Rails&#8230;</strong></p>
<p>Ler este artigo em português<br />
I&#8217;ve been looking for an elegant way to test relationships using Rais, and think it&#8217;s interesting how so few people really care about it. Most simply say that it&#8217;s up to the framework to test it&#8217;s o&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: A Fresh Cup &#187; Blog Archive &#187; Double Shot #120</title>
		<link>http://www.nullislove.com/2008/01/08/testing-in-rails-part-7-activerecord-relationships/#comment-877</link>
		<dc:creator>A Fresh Cup &#187; Blog Archive &#187; Double Shot #120</dc:creator>
		<pubDate>Wed, 09 Jan 2008 12:00:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.nullislove.com/2008/01/08/testing-in-rails-part-7-activerecord-relationships/#comment-877</guid>
		<description>[...] Testing in Rails: Part 7 - ActiveRecord Relationships - More from Null is Love. [...]</description>
		<content:encoded><![CDATA[<p>[...] Testing in Rails: Part 7 - ActiveRecord Relationships - More from Null is Love. [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
