Sha256: 89f249b72bbe807f0f28c31cbce52fa72e57b0d77231036fac3cf58c30757d67
Contents?: true
Size: 848 Bytes
Versions: 5
Compression:
Stored size: 848 Bytes
Contents
require 'rake/testtask' namespace :test do Rake::TestTask.new(:run) do |t| t.libs = PROJ.libs t.test_files = if test(?f, PROJ.test.file) then [PROJ.test.file] else PROJ.test.files end t.ruby_opts += PROJ.ruby_opts t.ruby_opts += PROJ.test.opts end if HAVE_RCOV desc 'Run rcov on the unit tests' task :rcov => :clobber_rcov do opts = PROJ.rcov.opts.dup << '-o' << PROJ.rcov.dir opts = opts.join(' ') files = if test(?f, PROJ.test.file) then [PROJ.test.file] else PROJ.test.files end files = files.join(' ') sh "#{RCOV} #{files} #{opts}" end task :clobber_rcov do rm_r 'coverage' rescue nil end end end # namespace :test desc 'Alias to test:run' task :test => 'test:run' task :clobber => 'test:clobber_rcov' if HAVE_RCOV # EOF
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
logging-0.9.0 | tasks/test.rake |
logging-0.9.1 | tasks/test.rake |
logging-0.9.2 | tasks/test.rake |
logging-0.9.3 | tasks/test.rake |
logging-0.9.4 | tasks/test.rake |