Sha256: 43551dd4d99e6d62621088814d8d052f04dcf50b4dff15ccd358d619564da564

Contents?: true

Size: 855 Bytes

Versions: 129

Compression:

Stored size: 855 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.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

129 entries across 125 versions & 42 rubygems

Version Path
ckuru-tools-0.0.13 tasks/test.rake
libxml-jruby-modified-1.0.2-jruby tasks/test.rake
libxml-jruby-modified-1.0.1-jruby tasks/test.rake
lijia-rmmseg-cpp-10.2.9.2 tasks/test.rake
Neurogami-roir-1.3.3.1 tasks/test.rake
Neurogami-roir-1.3.4 tasks/test.rake
Oshuma-pingfm-1.0.0 tasks/test.rake
Oshuma-pingfm-1.0.1 tasks/test.rake
Oshuma-pingfm-1.0.2 tasks/test.rake
aniero-iphone_data-0.0.0 tasks/test.rake
aniero-iphone_data-0.1.0 tasks/test.rake
aniero-tire_swing-0.0.2 tasks/test.rake
aniero-tire_swing-0.0.3 tasks/test.rake
aniero-tire_swing-0.0.4 tasks/test.rake
aniero-tire_swing-0.0.5 tasks/test.rake
aniero-tire_swing-0.0.6 tasks/test.rake
aniero-treehouse-0.0.2 tasks/test.rake
briandoll-greatest_common_factor-0.0.1 tasks/test.rake
briandoll-greatest_common_factor-0.0.2 tasks/test.rake
briandoll-rails_framework_diff-0.0.1 tasks/test.rake