File: ruby-tests.rake

package info (click to toggle)
ruby-git 1.13.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 4,124 kB
  • sloc: ruby: 5,385; sh: 507; perl: 64; makefile: 6
file content (22 lines) | stat: -rw-r--r-- 668 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
require 'gem2deb/rake/testtask'

ENV["LC_ALL"] = 'C.UTF-8'

# FIXME to support building with an older version of ruby-git installed
ENV["RUBYLIB"] ||= 'lib'
ENV["RUBYLIB"] += ':lib'

home = ENV["HOME"] = File.dirname(__FILE__) + '/home'
at_exit { FileUtils::Verbose.rm_rf(home) }
task :config do
  mkdir_p home
  sh 'git config --global user.email "git@example.com"' if `git config --global user.email`.strip.empty?
  sh 'git config --global user.name "GitExample"' if `git config --global user.name`.strip.empty?
end

Gem2Deb::Rake::TestTask.new(:test) do |t|
  t.libs = ['test']
  t.test_files = FileList['tests/**/test_*.rb']
end

task :default => [:config, :test]