Sha256: 06f745ba1692c1e153443a927270d9be721bb62fcaf1b227cde3f497624ef5af

Contents?: true

Size: 840 Bytes

Versions: 25

Compression:

Stored size: 840 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

Version data entries

25 entries across 25 versions & 4 rubygems

Version Path
vigetlabs-acts_as_markdown-0.1.0 tasks/test.rake
vigetlabs-acts_as_markdown-0.1.1 tasks/test.rake
vigetlabs-acts_as_markdown-0.1.2 tasks/test.rake
vigetlabs-acts_as_markup-0.1.1 tasks/test.rake
vigetlabs-acts_as_markup-0.2.0 tasks/test.rake
vigetlabs-acts_as_markup-0.3.0 tasks/test.rake
vigetlabs-acts_as_markup-0.4.0 tasks/test.rake
vigetlabs-acts_as_markup-1.0.0 tasks/test.rake
vigetlabs-acts_as_markup-1.1.0 tasks/test.rake
vigetlabs-acts_as_markup-1.1.1 tasks/test.rake
vigetlabs-acts_as_markup-1.1.2 tasks/test.rake
vigetlabs-acts_as_markup-1.2.0 tasks/test.rake
acts_as_markdown-0.1.1 tasks/test.rake
acts_as_markdown-0.1.0 tasks/test.rake
acts_as_markdown-0.1.2 tasks/test.rake
acts_as_markup-0.1.0 tasks/test.rake
acts_as_markup-0.4.0 tasks/test.rake
acts_as_markup-0.3.0 tasks/test.rake
acts_as_markup-0.1.1 tasks/test.rake
acts_as_markup-1.0.0 tasks/test.rake