Sha256: 3e7a66091d43a0edef2faa132b54a4b87c9f514142402404d31e4711d149852a

Contents?: true

Size: 929 Bytes

Versions: 16

Compression:

Stored size: 929 Bytes

Contents

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

namespace :test do

  Rake::TestTask.new(:run) do |t|
puts "YO"    
    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

end

# EOF

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
rackamole-0.4.1 tasks1/test.rake
rackamole-0.4.0 tasks1/test.rake
rackamole-0.3.9 tasks/test.rake
rackamole-0.3.8 tasks/test.rake
rackamole-0.3.7 tasks/test.rake
rackamole-0.3.6 tasks/test.rake
rackamole-0.3.5 tasks/test.rake
rackamole-0.3.4 tasks/test.rake
rackamole-0.3.3 tasks/test.rake
rackamole-0.3.2 tasks/test.rake
rackamole-0.3.1 tasks/test.rake
rackamole-0.3.0 tasks/test.rake
rackamole-0.2.9 tasks/test.rake
rackamole-0.2.8 tasks/test.rake
rackamole-0.2.7 tasks/test.rake
rackamole-0.2.6 tasks/test.rake