-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
75 lines (65 loc) · 1.44 KB
/
Rakefile
File metadata and controls
75 lines (65 loc) · 1.44 KB
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
70
71
72
73
74
75
require 'rake/clean'
require 'rubygems'
require 'rubygems/package_task'
require 'rdoc/task'
def cucumber?
require 'cucumber'
require 'cucumber/rake/task'
rescue LoadError
false
end
def rspec?
require 'rspec/core/rake_task'
require 'ci/reporter/rake/rspec'
end
Rake::RDocTask.new do |rd|
rd.main = "README.rdoc"
rd.rdoc_files.include("README.rdoc","lib/**/*.rb","bin/**/*")
rd.title = 'Your application title'
end
spec = eval(File.read('debify.gemspec'))
Gem::PackageTask.new(spec) do |pkg|
end
if cucumber?
CUKE_RESULTS = 'features/reports'
desc 'Run features'
Cucumber::Rake::Task.new(:features) do |t|
opts = [
"features",
"--format",
"junit",
"-o",
CUKE_RESULTS,
"--format",
"pretty",
"-x"]
opts += ["--tags", ENV['TAGS']] if ENV['TAGS']
opts += ["--tags", "not @skip"]
t.cucumber_opts = opts
t.fork = false
end
desc 'Run features tagged as work-in-progress (@wip)'
Cucumber::Rake::Task.new('features:wip') do |t|
tag_opts = %w[--tags @wip]
opts = [
"features",
"--format",
"junit",
"-o",
CUKE_RESULTS,
"--format",
"pretty",
"-x",
"-s"]
t.cucumber_opts = opts + tag_opts
t.fork = false
end
task :cucumber => :features
task 'cucumber:wip' => 'features:wip'
task :wip => 'features:wip'
end
if rspec?
desc 'Run specs'
RSpec::Core::RakeTask.new(:spec)
task :spec => 'ci:setup:rspec'
end