-
Notifications
You must be signed in to change notification settings - Fork 2
/
Rakefile
40 lines (29 loc) · 803 Bytes
/
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
require 'rspec/core/rake_task'
require 'cucumber/rake/task'
desc 'Create tasks to run unit tests'
RSpec::Core::RakeTask.new(:unit) do |t|
t.pattern = './spec/unit/{,/*/**}/*_spec.rb'
end
desc 'Create tasks to run integration tests'
RSpec::Core::RakeTask.new(:integration) do |t|
t.pattern = './spec/integration/{,/*/**}/*_spec.rb'
end
Cucumber::Rake::Task.new
desc 'Default: run specs and generate metrics'
namespace :coverage do
desc ""
task :integration do
ENV["COVERAGE"] = "disable"
Rake::Task['integration'].invoke
end
desc ""
task :unit do
ENV["COVERAGE"] = "enable"
Rake::Task['unit'].invoke
end
task :feature do
ENV["COVERAGE"] = "enable"
sh 'cucumber'
end
end
task :default => ["coverage:unit", "coverage:integration", "coverage:feature"]