#-*- mode: ruby; coding: utf-8 -*-
require 'gem2deb/rake/testtask'
require 'fileutils'
task :default => :post

task :pre do
  if File.exists?(".gem2deb.lib")
    FileUtils.symlink(".gem2deb.lib", "lib", { :force => true})
  end
end

task :post => :main do
  if File.exists?(".gem2deb.lib")
    FileUtils.remove("lib", { :force => true})
  end
end

Gem2Deb::Rake::TestTask.new(:main => :pre) do |t|
  t.test_files = FileList['test/**/*_test.rb']
  t.verbose = true
end
