Sha256: 8e7ec235d51601d61a61d4fc4fc9d41dccd3a963545e63799d8b78ef4607fc89

Contents?: true

Size: 777 Bytes

Versions: 8

Compression:

Stored size: 777 Bytes

Contents

# $Id$

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.tests 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.join(' ')
      files = if test ?f, PROJ.test_file then [PROJ.test_file]
              else PROJ.tests end
      files = files.join(' ')
      sh "#{RCOV} #{files} #{opts}"
    end

    desc 'Remove rcov products'
    task :clobber_rcov do
      rm_r 'coverage' rescue nil
    end
  end

end  # namespace :test

task :clobber => 'test:clobber_rcov' if HAVE_RCOV

# EOF

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
bones-1.1.0 data/tasks/test.rake
bones-1.0.0 data/tasks/test.rake
bones-1.1.1 data/tasks/test.rake
logging-0.5.2 tasks/test.rake
logging-0.5.1 tasks/test.rake
logging-0.5.0 tasks/test.rake
logging-0.5.3 tasks/test.rake
logging-0.6.0 rakelib/test.rake