-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathRakefile
69 lines (57 loc) · 1.69 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
65
66
67
68
69
# google4r-checkout Rakefile
require 'bundler/gem_tasks'
require 'rake'
require 'rake/testtask'
require 'rdoc/task'
desc 'Default: run all tests tests.'
task :default => :'test:all'
desc 'Runs all tests (alias of test:all)'
task :test => :'test:all'
#
# Documentation
#
desc 'Generate documentation for the google4r library.'
Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'docs'
rdoc.title = 'google4r/checkout'
rdoc.main = 'README.md'
rdoc.options << '--line-numbers' << '--inline-source'
rdoc.rdoc_files = FileList['lib/**/*.rb'] + FileList['README.md','LICENSE', 'CHANGES']
end
#
# Test, test, test! I love saying the word "test"!
#
desc 'Run all tests on the Google4R::Checkout::* classes.'
task :test => ["test:all"]
namespace :test do
desc 'Run all tests on the Google4R::Checkout::* classes.'
task :all do
errors = %w(unit integration system).collect do |task|
begin
Rake::Task["test:#{task}"].invoke
nil
rescue => e
task
end
end.compact
abort "Errors running #{errors.join(", ")}!" if errors.any?
end
desc 'Run unit tests on the Google4R::Checkout::* classes.'
Rake::TestTask.new(:unit) do |t|
t.libs << 'lib'
t.test_files = FileList['test/unit/*_test.rb']
t.verbose = true
end
desc 'Run integration tests on the Google4R::Checkout::* classes.'
Rake::TestTask.new(:integration) do |t|
t.libs << 'lib'
t.test_files = FileList['test/integration/*_test.rb']
t.verbose = true
end
desc 'Run system tests on the Google4R::Checkout::* classes.'
Rake::TestTask.new(:system) do |t|
t.libs << 'lib'
t.test_files = FileList['test/system/*_test.rb']
t.verbose = true
end
end