Sha256: ec4e4bbe20fc41ebb85370630e519a4c25ba3b48f16895b69c9f133573a47812

Contents?: true

Size: 824 Bytes

Versions: 3

Compression:

Stored size: 824 Bytes

Contents

# $Id: test.rake 417 2007-12-29 03:21:48Z tim_pease $

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

3 entries across 3 versions & 1 rubygems

Version Path
bones-1.1.0 tasks/test.rake
bones-1.0.0 tasks/test.rake
bones-1.1.1 tasks/test.rake