Permalink
Browse files

Merge branch 'master' into activerecord-2.2

  • Loading branch information...
2 parents 9364ba9 + b2db526 commit de38e1a371439972ba09a1817bde58290dc175f5 @mperham mperham committed Dec 1, 2008
Showing with 18 additions and 0 deletions.
  1. +18 −0 Rakefile
View
@@ -88,3 +88,21 @@ def create_mysql(create, db_name)
execute "create table the_whole_burritos (id integer not null auto_increment, name varchar(30) not null, primary key(id))"
execute "insert into the_whole_burritos (id, name) values (1, '#{db_name}')"
end
+
+# Test coverage
+begin
+ gem 'spicycode-rcov'
+ require 'rcov/rcovtask'
+
+ task :cover => [:pretest, :rcov]
+
+ Rcov::RcovTask.new('rcov') do |t|
+ t.libs << "test"
+ t.test_files = FileList["test/*_test.rb"]
+ t.output_dir = "coverage"
+ t.verbose = true
+ t.rcov_opts = ['--text-report', '--exclude', "test,Library,#{ENV['GEM_HOME']}", '--sort', 'coverage']
+ end
+rescue GemError => e
+ puts 'Test coverage support requires \'gem install spicycode-rcov\''
+end

0 comments on commit de38e1a

Please sign in to comment.