forked from hanami/model
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
44 lines (37 loc) · 821 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
41
42
43
44
require 'rake'
require 'rake/testtask'
require 'bundler/gem_tasks'
Rake::TestTask.new do |t|
t.pattern = 'test/**/*_test.rb'
t.libs.push 'test'
t.warning = false
end
Rake::TestTask.new do |t|
t.name = 'unit'
t.test_files = Dir['test/**/*_test.rb'].reject do |path|
path.include?('/integration')
end
t.libs.push 'test'
t.warning = false
end
Rake::TestTask.new do |t|
t.name = 'integration'
t.pattern = 'test/integration/**/*_test.rb'
t.libs.push 'test'
t.warning = false
end
namespace :test do
task :coverage do
ENV['COVERAGE'] = 'true'
Rake::Task['test'].invoke
end
desc 'Runs only unit tests'
task :unit do
Rake::Task['unit'].invoke
end
desc 'Run only integration tests'
task :integration do
Rake::Task['integration'].invoke
end
end
task default: :test