<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.3" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: TextMate bundle to Run Focused Test on a module</title>
	<link>http://www.rickylui.com/blog/2007/10/09/textmate-bundle-to-run-focused-test-on-a-module/</link>
	<description>Musings through my coloured lenses.  Or you can call this Ricky Bobby's musings.</description>
	<pubDate>Tue, 06 Jan 2009 10:34:21 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.3</generator>

	<item>
		<title>by: admin</title>
		<link>http://www.rickylui.com/blog/2007/10/09/textmate-bundle-to-run-focused-test-on-a-module/#comment-66</link>
		<pubDate>Tue, 30 Oct 2007 02:48:42 +0000</pubDate>
		<guid>http://www.rickylui.com/blog/2007/10/09/textmate-bundle-to-run-focused-test-on-a-module/#comment-66</guid>
					<description>Hey Prasanna!   I didn\'t describe it well, but the main reason is because it\'s a base module, not a base class:


class Cat &lt; ActiveRecord::Base; include Animal; end


We have the Animal module that contains common behaviour between Cats and Dogs, and we tested the Animal module not directly, but through testing Cat and Dog.


An alternative will be to have a test suite for the Animal module:


class AnimalTest &lt; Test::Unit::TestCase


and have a test animal that includes Animal: 

 
class TestAnimal &lt; ActiveRecord::Base; include Animal


and test Animal that way.  It just turns out that in our project, on the Animal module there are many template methods and so it\'s easier to test the subclasses rather than the module.</description>
		<content:encoded><![CDATA[<p>Hey Prasanna!   I didn\&#8217;t describe it well, but the main reason is because it\&#8217;s a base module, not a base class:</p>
<p>class Cat < ActiveRecord::Base; include Animal; end</p>
<p>We have the Animal module that contains common behaviour between Cats and Dogs, and we tested the Animal module not directly, but through testing Cat and Dog.</p>
<p>An alternative will be to have a test suite for the Animal module:</p>
<p>class AnimalTest < Test::Unit::TestCase</p>
<p>and have a test animal that includes Animal: </p>
<p>class TestAnimal < ActiveRecord::Base; include Animal</p>
<p>and test Animal that way.  It just turns out that in our project, on the Animal module there are many template methods and so it\&#8217;s easier to test the subclasses rather than the module.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Prasanna</title>
		<link>http://www.rickylui.com/blog/2007/10/09/textmate-bundle-to-run-focused-test-on-a-module/#comment-65</link>
		<pubDate>Sun, 28 Oct 2007 17:38:29 +0000</pubDate>
		<guid>http://www.rickylui.com/blog/2007/10/09/textmate-bundle-to-run-focused-test-on-a-module/#comment-65</guid>
					<description>Hey Ricky,

How are ya? I'm curious what the motivation to retest base class behavior when you're testing a class.

Thanks! Take care.
-Prasanna</description>
		<content:encoded><![CDATA[<p>Hey Ricky,</p>
<p>How are ya? I&#8217;m curious what the motivation to retest base class behavior when you&#8217;re testing a class.</p>
<p>Thanks! Take care.<br />
-Prasanna
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
