[rspec-users] RCov results seem to include the spec files

Michael Trier mtrier at eminentconsultinggroup.com
Mon Apr 9 13:55:17 EDT 2007


What about the test directory as well for those of us that are still  
migrating things over.

Michael
railsconsulting.com

On Apr 9, 2007, at 1:14 PM, Pat Maddox wrote:

> On 4/9/07, David Chelimsky <dchelimsky at gmail.com> wrote:
>> On 4/9/07, David Chelimsky <dchelimsky at gmail.com> wrote:
>>> On 4/9/07, Pat Maddox <pergesu at gmail.com> wrote:
>>>> I saw the RCov page at http://rspec.rubyforge.org/tools/ 
>>>> rcov.html and
>>>> decided to add it to my project.  My rakefile looks like this:
>>>>
>>>> require "rake"
>>>> require "spec/rake/spectask"
>>>>
>>>> desc "Run all specs with RCov"
>>>> Spec::Rake::SpecTask.new("spec:rcov") do |t|
>>>>   t.spec_files = FileList["spec/**/*_spec.rb"]
>>>>   t.rcov = true
>>>> end
>>>
>>> Try this:
>>>
>>> Spec::Rake::SpecTask.new("spec:rcov") do |t|
>>>   t.spec_files = FileList["spec/**/*_spec.rb"]
>>>   t.rcov = true
>>>   t.rcov_opts = ['--exclude', "spec"]
>>> end
>>>
>>> David
>>
>> FYI - I added this to docs for 0.9.
>> _______________________________________________
>> rspec-users mailing list
>> rspec-users at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/rspec-users
>>
>
> Hey David,
>
> Thanks for the info.
>
> For Rails apps, I use
> t.rcov_opts = ['--exclude', "spec", "--exclude", "config"]
>
> because it doesn't make much sense to include the config files either.
>
> Thanks again,
>
> Pat
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users



More information about the rspec-users mailing list