<?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>Snow Giraffe Tech &#187; test</title>
	<atom:link href="http://www.snowgiraffe.com/tech/tag/test/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.snowgiraffe.com/tech</link>
	<description>rails, rubies, and sometimes dolphins</description>
	<lastBuildDate>Mon, 07 Jun 2010 14:36:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>ar_test_runner: Run the ActiveRecord unit test suite with your modifications</title>
		<link>http://www.snowgiraffe.com/tech/507/ar_test_runner-run-activerecord-unit-tests-with-your-code/</link>
		<comments>http://www.snowgiraffe.com/tech/507/ar_test_runner-run-activerecord-unit-tests-with-your-code/#comments</comments>
		<pubDate>Tue, 12 May 2009 19:43:24 +0000</pubDate>
		<dc:creator>blythe</dc:creator>
				<category><![CDATA[ActiveRecord]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[ar-extensions]]></category>
		<category><![CDATA[ar_test_runner]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[regression test]]></category>
		<category><![CDATA[test]]></category>

		<guid isPermaLink="false">http://www.snowgiraffe.com/tech/?p=507</guid>
		<description><![CDATA[ar_test_runner provides a rake task to run the ActiveRecord core test suites with your plugins or files loaded. Make sure ActiveRecord tasks pass with your enhancements.]]></description>
			<content:encoded><![CDATA[<p><a style="padding-right: 5px; padding-bottom:15px;" href="http://www.flickr.com/photos/10407019@N08/868905183/"><img class="size-medium wp-image-517 alignleft" title="ghostrunners" src="http://www.snowgiraffe.com/tech/wp-content/uploads/2009/05/ghostrunners-300x199.jpg" alt="Run ActiveRecord regression tests with your code loaded" width="216" height="143" /></a>If you write plugins or code to enhance ActiveRecord functionality, its a really good idea to run the ActiveRecord core test suite with your cool additions loaded. After working on <a href="http://github.com/zdennis/ar-extensions">ar-extensions</a>, I liked the idea of running the core tests along with the plugin specific tests.  However, I soon grew tired of coding the same Rakefile for each of my eleventy billion AR plugins. Not DRY. Not fun. Not a unicorn party.</p>
<p>Thus was born, <a href="http://github.com/blythedunham/ar_test_runner">ar_test_runner</a>, a convenient plugin with a rake task to run the ActiveRecord test suites with your  code/gem/plugin load. You even can choose the ActiveRecord version and database.</p>
<h3>Install</h3>
<pre>  gem sources -a http://gems.github.com
  sudo gem install blythedunham-ar_test_runner</pre>
<h3>Run ar_test_runner</h3>
<p>Run all plugins and lib files against sqlite for app version</p>
<pre>ar_test_runner DB=sqlite</pre>
<p>Test 2.2.2 with <a href="http://github.com/blythedunham/rails"><span class="inlineCode">rails_devs_for_data_integrity</span></a> plugin loaded on mysql</p>
<pre>ar_test_runner PLUGIN=rails_devs_for_data_integrity AR_DIR=/Library/Ruby/Gems/1.8/gems/activerecord-2.2.2</pre>
<h3>Rake Tasks</h3>
<p>ar_test_runner works as a rake task, if installed as a plugin or by adding <span class="inlineCode"> require &#8220;ar_test_runner&#8221;</span> to the application&#8217;s Rakefile. The following example tests the applications default version of ActiveRecord with the files <span class="inlineCode">RAILS_ROOT/lib/my_file.rb</span> and <span class="inlineCode">RAILS_ROOT/lib/my_other_file.rb loaded</span></p>
<pre>rake test:activerecord:mysql FILE=lib/my_file.rb,lib/my_other_file.rb</pre>
<h3>Customize</h3>
<p>To specify (or skip)  gems, files, dirs, and plugins ot load or build custom runs see the documentation at <a href="http://github.com/blythedunham/ar_test_runner">ar_test_runner</a> .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.snowgiraffe.com/tech/507/ar_test_runner-run-activerecord-unit-tests-with-your-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
