Rails rcov Rake Task
May 22nd, 2006
I wrote a rake task for running rcov on my Rails apps and I figured someone else might find it usefull.
1 2 3 4 5 6 7 8 9 10 11 12 |
desc "Run rcov on current app" task :rcov do test_dir = "#{RAILS_ROOT}/test" dirs = [ "#{test_dir}/functional/*.rb", "#{test_dir}/integration/*.rb", "#{test_dir}/unit/*.rb"] command = "rcov -o #{test_dir}/coverage" dirs.each do |dir| command += " #{dir}" unless Dir[dir].empty? end system command end |
August 15th, 2007 at 11:19 AM
6ywjt5old51n4hep c6zy7eo4v59a09b 2rhxjxa5sygcdijl