forked from topfunky/mosquito
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
64 lines (54 loc) · 2.04 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
$: << 'lib'
$:.reject! { |e| e.include? 'TextMate' }
require 'rubygems'
require 'hoe'
require './lib/mosquito'
# Disable spurious warnings when running tests, ActiveMagic cannot stand -w
Hoe::RUBY_FLAGS.replace ENV['RUBY_FLAGS'] || "-I#{%w(lib test).join(File::PATH_SEPARATOR)}" +
(Hoe::RUBY_DEBUG ? " #{RUBY_DEBUG}" : '')
Hoe.new('Mosquito', Mosquito::VERSION) do |p|
p.name = "mosquito"
p.author = ["Geoffrey Grosenbach"] # TODO Add Julik ...
p.description = "A library for writing tests for your Camping app."
p.email = 'boss@topfunky.com'
p.summary = "A Camping test library."
p.changes = p.paragraphs_of('CHANGELOG', 0..1).join("\n\n")
p.url = "http://mosquito.rubyforge.org"
p.remote_rdoc_dir = '' # Release to root on rubyforge
# We need that so that Hoe does not grab Camping's own distro tests
p.test_globs = ['test/test_*.rb']
p.rsync_args << ' --exclude=statsvn/'
p.rdoc_pattern = /README|CHANGELOG|mosquito/
p.clean_globs = ['**.log', 'coverage', 'coverage.data', 'test/test.log', 'email.txt']
p.extra_deps = ['activerecord', 'activesupport', 'camping']
end
begin
require 'rcov/rcovtask'
desc "just rcov minus html output"
Rcov::RcovTask.new do |t|
t.test_files = FileList["test/test_*.rb"]
t.verbose = true
end
desc 'Aggregate code coverage for unit, functional and integration tests'
Rcov::RcovTask.new("coverage") do |t|
t.test_files = FileList["test/test_*.rb"]
t.output_dir = "coverage"
t.verbose = true
t.rcov_opts << '--aggregate coverage.data'
end
rescue LoadError
end
require 'rake/testtask'
multicamp_tasks = Dir.glob(File.dirname(__FILE__) + '/test/camping-dist/camping-*/lib').sort.map do | path |
distname = File.basename(File.dirname(path))
libs = path[(File.dirname(__FILE__) + '/').length..-1]
desc "Run tests with #{distname}"
Rake::TestTask.new("test-with-#{distname}") do |t|
t.libs << "test" << libs
t.pattern = 'test/test_*.rb'
t.verbose = true
end
"test-with-#{distname}"
end
desc "Run with multiple Camping versions"
task :multicamp => multicamp_tasks