Permalink
Browse files

Ignore files from RCov stats

  • Loading branch information...
1 parent 24462a6 commit 0d541b7775c65a2aa633326316120fd2654d31c4 @lsegal committed Oct 16, 2009
Showing with 8 additions and 2 deletions.
  1. +8 −2 Rakefile
View
@@ -28,8 +28,14 @@ Spec::Rake::SpecTask.new("specs") do |t|
t.spec_opts = ["--format", "specdoc", "--colour"]
t.spec_opts += ["--require", File.join(File.dirname(__FILE__), 'spec', 'spec_helper')]
t.spec_files = Dir["spec/**/*_spec.rb"].sort
- t.rcov = true if ENV['RCOV']
- t.rcov_opts = ['-x', '_spec\.rb$,spec_helper\.rb$']
+
+ if ENV['RCOV']
+ hide = '_spec\.rb$,spec_helper\.rb$,ruby_lex\.rb$,autoload\.rb$'
+ hide += ',legacy\/.+_handler' if RUBY19
+ hide += ',ruby_parser\.rb$,ast_node\.rb$,handlers\/ruby\/[^\/]+\.rb$' if RUBY18
+ t.rcov = true
+ t.rcov_opts = ['-x', hide]
+ end
end
task :spec => :specs

0 comments on commit 0d541b7

Please sign in to comment.