<?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: Customize Your Rake Files</title>
	<atom:link href="http://shifteleven.com/articles/2007/03/05/customize-your-rake-files/feed" rel="self" type="application/rss+xml" />
	<link>http://shifteleven.com/articles/2007/03/05/customize-your-rake-files</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Thu, 29 Jul 2010 17:19:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0-alpha</generator>
	<item>
		<title>By: Jason Perry</title>
		<link>http://shifteleven.com/articles/2007/03/05/customize-your-rake-files/comment-page-1#comment-92</link>
		<dc:creator>Jason Perry</dc:creator>
		<pubDate>Fri, 30 Mar 2007 18:16:30 +0000</pubDate>
		<guid isPermaLink="false">http://dev.fecalrod.com/?p=27#comment-92</guid>
		<description>Cool stuff. Here&#039;s the one I use.

&lt;code&gt;&lt;pre&gt;

require &#039;rake/clean&#039;

RBINDIR = Config::CONFIG[&#039;bindir&#039;]

RBIN = &quot;#{RBINDIR}/rcov&quot;

if File.exists?(RBIN)

  # output goes to subdirectories of this one
  RCOV_OUT = &quot;coverage&quot;

  # &quot;rake clobber&quot; to remove output directory (along with other generated stuff)
  CLOBBER.include(RCOV_OUT)

  # don&#039;t report coverage on these files
  RCOV_EXCLUDE = %w(boot.rb environment.rb routes.rb vendor test/functional test/unit).join(&#039;,&#039;)

  # RCOV command, run as though from the commandline.  Amend as required or perhaps move to config/environment.rb?
  RCOV = &quot;#{RBINDIR}/ruby #{RBIN} --exclude #{RCOV_EXCLUDE} --output #{RCOV_OUT}&quot;

  namespace :test do

    desc &quot;generate a coverage report for unit and functional tests together in #{RCOV_OUT}/index.html&quot;
    task :coverage do
      rm_rf RCOV_OUT
      sh &quot;#{RCOV} test/unit/*.rb test/functional/*.rb&quot;
    end

    namespace :coverage do

      desc &quot;generate a unit test coverage report in #{RCOV_OUT}/index.html&quot;
      task :unit do
        sh &quot;#{RCOV} test/unit/*.rb&quot;
      end

      desc &quot;generate a functional test coverage report in #{RCOV_OUT}/index.html&quot;
      task :functional do
        sh &quot;#{RCOV} test/functional/*.rb&quot;
      end

    end

  end

end
&lt;/pre&gt;&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Cool stuff. Here&#8217;s the one I use.</p>
<p><code>
<pre>

require 'rake/clean'

RBINDIR = Config::CONFIG['bindir']

RBIN = "#{RBINDIR}/rcov"

if File.exists?(RBIN)

  # output goes to subdirectories of this one
  RCOV_OUT = "coverage"

  # "rake clobber" to remove output directory (along with other generated stuff)
  CLOBBER.include(RCOV_OUT)

  # don't report coverage on these files
  RCOV_EXCLUDE = %w(boot.rb environment.rb routes.rb vendor test/functional test/unit).join(',')

  # RCOV command, run as though from the commandline.  Amend as required or perhaps move to config/environment.rb?
  RCOV = "#{RBINDIR}/ruby #{RBIN} --exclude #{RCOV_EXCLUDE} --output #{RCOV_OUT}"

  namespace :test do

    desc "generate a coverage report for unit and functional tests together in #{RCOV_OUT}/index.html"
    task :coverage do
      rm_rf RCOV_OUT
      sh "#{RCOV} test/unit/*.rb test/functional/*.rb"
    end

    namespace :coverage do

      desc "generate a unit test coverage report in #{RCOV_OUT}/index.html"
      task :unit do
        sh "#{RCOV} test/unit/*.rb"
      end

      desc "generate a functional test coverage report in #{RCOV_OUT}/index.html"
      task :functional do
        sh "#{RCOV} test/functional/*.rb"
      end

    end

  end

end
</pre>
<p></code></p>
]]></content:encoded>
	</item>
</channel>
</rss>
