Sha256: 01807ce310e032ff8100ee06f2a0e98724d9bc463bf7e423f9be885c5a37cbbd

Contents?: true

Size: 710 Bytes

Versions: 2

Compression:

Stored size: 710 Bytes

Contents

if test(?e, PROJ.test.file) or not PROJ.test.files.to_a.empty?
require 'rake/testtask'
if HAVE_RCOV
  require 'rcov/rcovtask'
end

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'
    Rcov::RcovTask.new do |t|
      t.test_files = PROJ.test.files
      opts = PROJ.rcov.opts.dup << '-o' << PROJ.rcov.dir
      t.rcov_opts = PROJ.rcov.opts
    end
  end

end  # namespace :test

desc 'Alias to test:run'
task :test => 'test:run'

end

# EOF

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
brianjlandau-doppelganger-0.8.0 tasks/test.rake
doppelganger-0.8.0 tasks/test.rake