-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
36 lines (30 loc) · 832 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
require "bundler/gem_tasks"
desc "Run all specs"
task 'spec:all' => ['spec:unit', 'spec:integration']
desc "Run specs of unit test"
task 'spec:unit' do
filelist = FileList['spec/**/*_spec.rb'].delete_if do |path|
/integration_test/ =~ path
end
filelist.each do |path|
sh "rspec #{path}"
end
Rake::Task['clean:temporary'].execute
end
desc "Run specs of integration test"
task 'spec:integration' do
FileList['spec/integration_test/**/*_spec.rb'].sort.each do |path|
sh "rspec #{path}"
end
Rake::Task['clean:temporary'].execute
end
task :default => 'spec:all'
require 'yard'
YARD::Rake::YardocTask.new
desc "Remove temporary home directory for specs."
task "clean:temporary" do
dir = File.join(File.dirname(__FILE__), 'spec', 'home_for_spec')
if File.exist?(dir)
FileUtils.rm_r(dir)
end
end