<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: Test Injector Plugin for Rails</title>
	<atom:link href="http://www.infused.org/2006/07/28/test-injector-plugin-for-rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.infused.org/2006/07/28/test-injector-plugin-for-rails/</link>
	<description></description>
	<pubDate>Wed,  7 Jan 2009 16:51:00 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Eric Beland</title>
		<link>http://www.infused.org/2006/07/28/test-injector-plugin-for-rails/comment-page-1/#comment-17917</link>
		<dc:creator>Eric Beland</dc:creator>
		<pubDate>Thu, 28 Feb 2008 20:29:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.infused.org/2006/07/28/test-injector-plugin-for-rails/#comment-17917</guid>
		<description>Does this plugin work on Rails 2? I'm trying use it but not having much luck.  It looks like Rails 2 uses ActiveSupport::TestCase as opposed to Test::Unit::TestCase.  I changed that in my local copy, but I'm still seeing undefined method inject_activerecord_tests.  Any thoughts?</description>
		<content:encoded><![CDATA[<p>Does this plugin work on Rails 2? I&#8217;m trying use it but not having much luck.  It looks like Rails 2 uses ActiveSupport::TestCase as opposed to Test::Unit::TestCase.  I changed that in my local copy, but I&#8217;m still seeing undefined method inject_activerecord_tests.  Any thoughts?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sergey</title>
		<link>http://www.infused.org/2006/07/28/test-injector-plugin-for-rails/comment-page-1/#comment-7650</link>
		<dc:creator>sergey</dc:creator>
		<pubDate>Tue, 17 Oct 2006 15:15:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.infused.org/2006/07/28/test-injector-plugin-for-rails/#comment-7650</guid>
		<description>To avoid necessity to have associations for EACH object,
suggest to apply the rule only for the FIRST object.
Small  change in the test_injector.rb define_collectible_association_test method:

record = klass.find(:first, :conditions =&#62; "id=1")</description>
		<content:encoded><![CDATA[<p>To avoid necessity to have associations for EACH object,<br />
suggest to apply the rule only for the FIRST object.<br />
Small  change in the test_injector.rb define_collectible_association_test method:</p>
<p>record = klass.find(:first, :conditions =&gt; &#8220;id=1&#8243;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Admin</title>
		<link>http://www.infused.org/2006/07/28/test-injector-plugin-for-rails/comment-page-1/#comment-7172</link>
		<dc:creator>Admin</dc:creator>
		<pubDate>Fri, 18 Aug 2006 00:49:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.infused.org/2006/07/28/test-injector-plugin-for-rails/#comment-7172</guid>
		<description>Good suggestion Michael.  The latest version lets you define the ignored associations in the inject_test declaration:

inject_tests :activerecord, :ignore_associations =&gt; [:groups, :tokens]</description>
		<content:encoded><![CDATA[<p>Good suggestion Michael.  The latest version lets you define the ignored associations in the inject_test declaration:</p>
<p>inject_tests :activerecord, :ignore_associations => [:groups, :tokens]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Schuerig</title>
		<link>http://www.infused.org/2006/07/28/test-injector-plugin-for-rails/comment-page-1/#comment-7165</link>
		<dc:creator>Michael Schuerig</dc:creator>
		<pubDate>Thu, 17 Aug 2006 10:24:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.infused.org/2006/07/28/test-injector-plugin-for-rails/#comment-7165</guid>
		<description>There are a few plugins that add associations to model classes. In my own tests I don't want to test these plugins and I really don't want to go to the trouble of setting up the fixtures for them. So I need a way to ignore associations in addition to those that TestInjector already knows about. It's a pretty simple change to test_injector.rb

  @@ignored_associations = [:versions, :parent, :children]
  mattr_accessor :ignored_associations

...

    def inject_association_tests
      collectible_associations = [:has_many, :has_and_belongs_to_many]
      klass.reflect_on_all_associations.each do &#124;association&#124;
        unless TestInjector.ignored_associations.include?(association.name)
...</description>
		<content:encoded><![CDATA[<p>There are a few plugins that add associations to model classes. In my own tests I don&#8217;t want to test these plugins and I really don&#8217;t want to go to the trouble of setting up the fixtures for them. So I need a way to ignore associations in addition to those that TestInjector already knows about. It&#8217;s a pretty simple change to test_injector.rb</p>
<p>  @@ignored_associations = [:versions, :parent, :children]<br />
  mattr_accessor :ignored_associations</p>
<p>&#8230;</p>
<p>    def inject_association_tests<br />
      collectible_associations = [:has_many, :has_and_belongs_to_many]<br />
      klass.reflect_on_all_associations.each do |association|<br />
        unless TestInjector.ignored_associations.include?(association.name)<br />
&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
